Qt project, including for iOS. If on the iPhone to terminate the program forcibly (with a swipe up after switching to the listing of running programs), the result of the execution is returned == -113.

int execRes = app.exec(); 

What does this constant mean?

  • I assume that this means that xcode has lost contact with the application :) - Max Mikheyenko
  • in this case it may be so, but we still received error reports with logs with such a termination code - pier_nasos

1 answer 1

Exec () is actually a loop that terminates when you call quit or exit. When you click on the Close button ("X") in the window, then exit (0) is called. Therefore, the loop ends the event.

So, most likely, you have not created the main widget.

If you did, then check your code in other parts of the application. It is possible that you have formed an infinite loop somewhere.

 #include <QPushButton> ... Здесь вы пишете код вашего приложения ... QPushButton btn("Temporary button", NULL); btn.show(); ... Здесь часть, где вы вызываете exec. 
  • The interface of the application in qml. In main.cpp, before launching app.exec (), the main window QQmlApplicationEngine engine is loaded; ... engine.load (QUrl (QStringLiteral ("qrc: /main.qml"))); int execRes = app.exec (); in the main.qml ApplicationWindow {...} component - pier_nasos