Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to disable gui while creating QApplication object in QT 5.6
Qt 6.11 is out! See what's new in the release blog

How to disable gui while creating QApplication object in QT 5.6

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 1.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Maddineni
    wrote on last edited by
    #1

    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

    JonBJ 1 Reply Last reply
    0
    • M Maddineni

      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

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by
      #2

      @Maddineni
      I have not used Qt 4.

      But at Qt 5 you will need to use http://doc.qt.io/qt-5/qcoreapplication.html (QCoreApplication) for non-GUI app. QApplication & QGuiApplication derive from that, but specialize to require a GUI.

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved