Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Get rid of QWS option
Forum Updated to NodeBB v4.3 + New Features

Get rid of QWS option

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 869 Views 2 Watching
  • 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.
  • K Offline
    K Offline
    kumararajas
    wrote on last edited by
    #1

    Hello,

    My application has different processes doing different job.

    There is a Main Process, who acts as a parent process and that creates all the child process.
    The reason for being child process is that, it is optional for the system. These options are configurable.

    One of the child process is "Qt UI". For the complete system, display unit becomes optional. So the UI goes optional.

    Having this as a overview,
    Qt application runs in a child process. Since it a child process, it has no "main". main() function is in the parent process. And the entry point of the Qt process would be some function. Example "StartUI()". This function will be spawned as a child process.

    So, since there is no main for Qt UI, cannot get the command line argument for QWS server.

    Also the parent process example "./MainApplication" cannot take the option "-qws" because it doesnt makes sense for the main application to take such argument.

    So having said as a scenario, I would like to manipulate or compute the QWS server options inside my code and pass to QApplication. Is there any way?

    I read about QApplication::GuiServer option for QApplication. But for some reason that doesn't work.
    Please let me know if you know any way.

    Thank you,
    Kumara

    --Kumar

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Is your MainApplication a daemon ? Or should it be the main QWS server also ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      K 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Is your MainApplication a daemon ? Or should it be the main QWS server also ?

        K Offline
        K Offline
        kumararajas
        wrote on last edited by
        #3

        @SGaist The MainApplication is not a Qt application. It is a parent process does few job of creating multiple child process.

        So, since it is not a Qt application, it doesn't makes sense to pass "-qws" to it.

        That's were I tried to manage "QWS" inside the code.

        Yesterday after posting this question, I have worked some more and got it working.

        Solution looks simple. But I dont know the consequences yet.

        While creating QApplication object, I pass "QApplication::GUIServer" to it.

        And just pass a dummy "argc" and "argv" to it.

        So far it works good. But, have not tested extensively.

        --Kumar

        1 Reply Last reply
        0

        • Login

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