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

QWindow::setIcon does not set the window's icon (if the platform window does not exist yet)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.1.1
    • 5.0.2
    • GUI: Window management
    • None
    • Windows 7 x64, MSVC 2012
      Linux, XCB
      Mac
    • b24a115706d89351d4b0ebb075e869349490b301

    Description

      Given a qrc containing test.png (a 16x16 32-bit image), the following code fails to display the image as the window's icon:

      main.cpp
      #include <QGuiApplication>
      #include <QWindow>
      
      int main(int argc, char** argv)
      {
          QGuiApplication app(argc, argv);
          QWindow w;
          w.setIcon(QIcon(":/test.png"));
          w.show();
          return app.exec();
      }
      

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            jpm86 Jason Mealler
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes