It is likely nothing can be done to solve your problem because:
1) all the GUI work must be done in the same thread, which means that the VideoWidget constructor will freeze the rest of the GUI;
2) having the event loop running will not help unless the VideoWidget constructor itself calls e.g. qApp->processEvents().
On a side note, it is in general a bad idea to do some heavy work in the constructor of the main window. You should instead move the time-consuming code to a private slot initialize() and schedule its execution as soon as event processing starts by adding, for instance, the following line to the window's constructor:
QTimer::singleShot(0,
this,
SLOT(initialize
()));
QTimer::singleShot(0, this, SLOT(initialize()));
To copy to clipboard, switch view to plain text mode
Bookmarks