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

Widget doesn't show after windowHandle()->destroy()

    XMLWordPrintable

Details

    • Linux/Wayland, Linux/X11
    • def4f827d (dev), a46cb99c6 (6.9), 873fa9cc8 (6.8)

    Description

      The following code leads to no window being shown

      #include <QApplication>
      #include <QWidget>
      #include <QWindow>
      
      int main(int argc, char *argv[]) {
      	QApplication app(argc, argv);
      	QWidget widget;
      	widget.resize(0, 0);
      	widget.createWinId();
      	widget.windowHandle()->destroy();
      	widget.resize(100, 100);
      	widget.show();
      	return app.exec();
      }
      

      It seems it's because Qt::WA_OutsideWSRange gets set in QWidget::create but doesn't get unset in QWidget::destroy

      Attachments

        Issue Links

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

          Activity

            People

              liaqi Liang Qi
              ilya-fedin Ilya Fedin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes