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

Blank windows when reuse instance of QDialog::exec()

    XMLWordPrintable

Details

    • Linux/X11, macOS, Windows

    Description

      Starting from Qt 5.12.4 to reuse instance of QDialog creates blank window, content is shown to user only after manualy resizing window by user ( imposibble with fixed size dialog )

       

      Bug in Windows 10 is first introduced in 5.12.4, Previous versions (<5.12.4) work as intended.

      Code to replicate bad behaviour:

       

      // Prepare test QDialog
      auto dialog = new QDialog( this );
      auto layout = new QVBoxLayout();
      layout->addWidget(new QLabel("This text should be visible") );
      dialog->setLayout( layout );
      
      // First use of dialog
      dialog->exec();
      // Correct content is shown
      
      // Second use of dialog
      dialog->exec();
      // Empty window is shown - it is visible again on size change by user.
      
      

      First use of dialog->exec() produces:

       

       

       

      Second use of dialog->exec() produces:

      Attachments

        1. bugv2.zip
          3 kB
        2. QDialog-first-use.png
          QDialog-first-use.png
          29 kB
        3. QDialog-secondt-use.png
          QDialog-secondt-use.png
          29 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            michal.bernat Michał Bernat
            Votes:
            7 Vote for this issue
            Watchers:
            18 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes