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. why UI will freeze when using the api createWindowContainer qt5.15.2, but other version of QT have no problem

why UI will freeze when using the api createWindowContainer qt5.15.2, but other version of QT have no problem

Scheduled Pinned Locked Moved Solved General and Desktop
11 Posts 3 Posters 1.0k 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.
  • J Offline
    J Offline
    jimfar
    wrote on last edited by
    #1

    1 i build QT5.15.2 source using VS2017 64bit,and sucess. the configure is like this "configure.bat -opensource -confirm-license -verbose -prefix "C:\Qt\Qt5.15.2\5.15.2\msvc2017_64" -debug-and-release -force-debug-info -separate-debug-info -nomake tests -nomake examples -opengl dynamic -plugin-sql-sqlite -platform win32-msvc -qt-zlib -force-debug-info -mp -skip qtwebengine -skip qtconnectivity "
    2 when i use the QT5.15.2 to rebuild my project ,i found that once using this api QWidget::createWindowContainer(m_window),the app will freeze . and when i use previous qt version(QT5.13.2 QT5.12.0 ...), it doesnot have this problem
    3 who can help me ? thanks

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jimfar
      wrote on last edited by
      #2

      new test result

      add: when the type of m_window is Qt3DWindow,the app will freeze ,and if the the type of m_window is QtWindow,the app will not freeze.

      1 Reply Last reply
      0
      • J Offline
        J Offline
        jimfar
        wrote on last edited by
        #3

        QtWindow-->QWindow

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

          Hi,

          Can you trigger that with a minimal compilable example ?

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

          1 Reply Last reply
          0
          • J Offline
            J Offline
            jimfar
            wrote on last edited by
            #5

            how to do this? u mean Compile QT3D separately?

            jsulmJ 1 Reply Last reply
            0
            • J jimfar

              how to do this? u mean Compile QT3D separately?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @jimfar No, just create an application which reproduces this issues and as small as possible (no other parts of your application).

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • J Offline
                J Offline
                jimfar
                wrote on last edited by
                #7

                #include <Qt3DExtras/Qt3DWindow>
                void function1(QObject* receiver, int isrun, int b)
                {
                while (1)
                {
                Qtmsleep(1000);
                }
                }
                #include <QApplication>
                void maintest(int argc, char* argv[])
                {
                QApplication a(argc, argv);
                Qt3DExtras::Qt3DWindow*_windows = new Qt3DExtras::Qt3DWindow();
                QWidget *pv = QWidget::createWindowContainer(_windows );
                QtConcurrent::run( function1, pv, 0, 0);
                pv->show( );
                int result1 = a.exec();
                }
                only when comment QWidget *pv = QWidget::createWindowContainer(_windows );,it will show the window,otherwise it will not show. and i found after pv->show( ), QThreadPool::globalInstance()->activeThreadCount() will goes from 1 to 16. but in QT5.13.2 ,it alway keep value 1. and QT5.13.2 doesnot have the same problem

                1 Reply Last reply
                0
                • J Offline
                  J Offline
                  jimfar
                  wrote on last edited by
                  #8

                  ok I think i found the problem , the Qt3DWindow of QT5.15.2 will set QThreadPool::globalInstance()->maxThreadCount() to 16 in somewhere, and also will create 16 activethread for itself. if faild will block the UI thread

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

                    What do you get if you trigger your QtConcurrent run through a QTimer ?

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

                    1 Reply Last reply
                    0
                    • J Offline
                      J Offline
                      jimfar
                      wrote on last edited by
                      #10

                      get the same result 。i use "QTimer::singleShot"

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

                        Can you show the latest version of your code ?

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

                        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