why UI will freeze when using the api createWindowContainer qt5.15.2, but other version of QT have no problem
-
Hi,
Can you trigger that with a minimal compilable example ?
-
#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 -
What do you get if you trigger your QtConcurrent run through a QTimer ?
-
Can you show the latest version of your code ?