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

QSplashScreen doesn't repaint properly when exposed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: Not Evaluated Not Evaluated
    • None
    • 4.8.0
    • None
    • Centos 5.3
      KDE 3.5.4
      GCC 4.1.2

      In Qt 4.8.0, a QSplashScreen which is obscured and then becomes visible again doesn't repaint its associated QPixmap properly. The code below is taken from the QSplashScreen documentation (with the QTest::qSleep added to allow time to view the splash screen) and can be used with any image as "splash.png".

      To see the issue, execute the code below and drag another window over the QSplashScreen widget (partially or fully obscuring it) and then re-expose the QSplashScreen. Notice that the obscured regions are not repainted properly and are instead blank or garbled. In Qt 4.5.3, the exact same code works perfectly, repainting the QPixmap contents back into the re-exposed regions.

      #include <QApplication>
      #include <QMainWindow>
      #include <QSplashScreen>
      #include <QTest>
      
      int main(int argc, char *argv[])
      {
          QApplication app(argc, argv);
          QPixmap pixmap("splash.png");
          QSplashScreen splash(pixmap);
          splash.show();
          app.processEvents();
      
          // Sleep for 5 sec so the splash screen is visible
          QTest::qSleep(5000);
      
          QMainWindow window;
          window.show();
          splash.finish(&window);
          return app.exec();
      }
      

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

            w00t Robin Burchell
            aferrall@ilm.com Adam Ferrall-Nunge
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes