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

setting WA_NativeWindow attribute doesn't immediately create native window

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.7.0
    • None

      The following test application used to create native window id right away in 4.6, but not anymore in 4.7:

      #include <QtGui>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          QWidget w;
          w.setAttribute(Qt::WA_NativeWindow);
          w.setAttribute(Qt::WA_DontCreateNativeAncestors);
          w.createWinId();
          QWidget w2(&w);
          w2.setAttribute(Qt::WA_NativeWindow);
          w2.setAttribute(Qt::WA_DontCreateNativeAncestors);
          qDebug() << &w2 << w2.internalWinId();
          w.show();
          return app.exec();
      }
      

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

            bjnilsen Bjørn Erik Nilsen
            dzyubenk Denis Dzyubenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes