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

Widget with Qt::FramelessWindowHint and Qt::WA_TranslucentBackground stops painting after minimize/restore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.1.1, 5.2.0
    • 4.6.2, 4.7.0, 5.1.0 Beta 1
    • None
    • Windows 7
    • 6800728d091e5122e6d93675db84ee028221d161 (5.1.1), transient children: bc4ce284ade4e3584370a74a0cc6aadc40301231 (5.1.2)

    Description

      I have a widget with the Qt::FramelessWindowHint and Qt::WA_TranslucentBackground flags. When the app is minimized (through a button or other means), and is programmatically restored (message box, showNormal(), etc), the app will no longer respond to paint events.

      I've reproduced this in a standalone app, attached to this bug. Press the button after the app launches. The app will minimize itself. In 3 seconds, it will restore itself. After it's restored, notice that the button no longer responds to mouse over events by changing its appearance, but you can click on it and minimize the app again. Once you click on it, things will start painting again. Note: If the app restores itself behind other windows and you have to manually bring the app to the front, it will not exhibit this issue. It's best to minimize everything else to reproduce this 100%.

      I do have a workaround, which is to manually post an update request from the showEvent() method.

      void MainWindow::showEvent(QShowEvent *event)

      { QApplication::postEvent(this, new QEvent(QEvent::UpdateRequest), Qt::LowEventPriority); QWidget::showEvent(event); }

      Attachments

        1. MinimizeBug.zip
          3 kB
        2. MinimizeBug[QTextEdit].zip
          6 kB
        3. qtbug17548.tar
          10 kB
        4. qtbug17548_dlg.tar
          10 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-17548
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              cidstrom Courtland Idstrom
              Votes:
              11 Vote for this issue
              Watchers:
              16 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes