Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
4.6.0
-
None
-
Windows XP 2002 Service Pack 3
Description
If an object that is not in the UI thread calls QWidget.winId() when the id is not yet defined, a new id is created and the QEvent::WinIdChange is sent through QCoreApplication::sendEvent().
This causes QApplication to assert because the event emitter thread is not the same as the receiver thread ("Cannot send events to objects owned by a different thread. ").
QWidgetPrivate::setWinId should use QCoreApplication::postEvent() instead of sendEvent() (or API should state that it is not allowed to call QWidget.winId() from a worker thread).