Unsolved How to disable GUI while craeting QApplication object in QT 5.6
-
Hi ,
One our Operating systems does not have X server.
To run our QT application in Console mode in non- Xserver machine , I have used below QApplication constructor.QApplication::QApplication(int & argc, char ** argv, bool GUIenabled) -> supports in QT 4.8
Now we have upgraded our QT software from 4.8 to 5.6 .
In QT 5.6 , above QApplication construtor is not supporting. In our appliation we are inheriting a class from QApplication and initialising many other objects in that class and we are showing a splash screen before launching main application.
Now I am not able to run my application in console mode.
TO resolve this I think I need to duplicate my classes and inherite the duplicate class from QCore application .Could you please let me know , if there is any way to resolve this issue in simpler way.
Regards,
Seetharam -
@seetharam
This post is duplicated in https://forum.qt.io/topic/90623/how-to-disable-gui-while-creating-qapplication-object-in-qt-5-6, where I have posted.It really is best not to post identical duplicate threads....
-
Hi
Yes you need to refactor your code and use
QCoreApplication and QApplication depending on console or GUI mode.
No way around it as its how it works now. -
@mrjj
No point you spending your time here, because the post is also duplicated a 3rd time and answered, as per https://forum.qt.io/topic/89993/qapplication-not-working-as-expected-with-3rd-paramaeter-guimode/8 ... :( -
Oh
Already answer.
Thank you @JonB
https://forum.qt.io/topic/89993/qapplication-not-working-as-expected-with-3rd-paramaeter-guimodeLocking this one.