Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-7236

QWidget.winId() sends WinIdChange event while it should post it

    XMLWordPrintable

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).

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            goffart Olivier Goffart (closed Nokia identity) (Inactive)
            mekugi Patrick Schyrr
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes