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. ProcessEvents does not add widget to layout & display.
QtWS25 Last Chance

ProcessEvents does not add widget to layout & display.

Scheduled Pinned Locked Moved Unsolved General and Desktop
qopenglwindow
6 Posts 3 Posters 1.0k 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.
  • D Offline
    D Offline
    Dariusz
    wrote on 20 Jun 2019, 17:21 last edited by
    #1

    Hey

    I wish to add a QOpenGLWindow to a widget during a long process & I would like it to get initialized(initializeGL) before continuing with function. However when I try qApp::ProcessEvents() or QApplication::processEvents() it does not get added nor initialized as I need it to. How can I do it?

    Regards
    Dariusz

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 20 Jun 2019, 20:08 last edited by
      #2

      Hi,

      Are you running your long process in the main thread ?

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

      D 1 Reply Last reply 20 Jun 2019, 21:52
      2
      • S SGaist
        20 Jun 2019, 20:08

        Hi,

        Are you running your long process in the main thread ?

        D Offline
        D Offline
        Dariusz
        wrote on 20 Jun 2019, 21:52 last edited by
        #3

        @SGaist yup

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 20 Jun 2019, 22:00 last edited by
          #4

          In that case, you should rather move it to a separate thread.

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

          D 1 Reply Last reply 20 Jun 2019, 22:23
          4
          • S SGaist
            20 Jun 2019, 22:00

            In that case, you should rather move it to a separate thread.

            D Offline
            D Offline
            Dariusz
            wrote on 20 Jun 2019, 22:23 last edited by Dariusz
            #5

            @SGaist I though I cant create widgets in non main thread?
            I'm simply configuring my opengl window + its scene & crating following managers after the openGl window/scene is ceated. But they dont always relate to each other so I want to force initializeGL in order to get rest generated as well.

            A 1 Reply Last reply 21 Jun 2019, 08:39
            0
            • D Dariusz
              20 Jun 2019, 22:23

              @SGaist I though I cant create widgets in non main thread?
              I'm simply configuring my opengl window + its scene & crating following managers after the openGl window/scene is ceated. But they dont always relate to each other so I want to force initializeGL in order to get rest generated as well.

              A Offline
              A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on 21 Jun 2019, 08:39 last edited by
              #6

              @Dariusz

              @SGaist I though I cant create widgets in non main thread?

              Correct, but you can emit a signal from the thread and react on it in the main thread.

              Qt has to stay free or it will die.

              1 Reply Last reply
              4

              4/6

              20 Jun 2019, 22:00

              • Login

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