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

Unable to get file icon by QFileIconProvider()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P1: Critical
    • None
    • 6.0.2
    • Widgets: Itemviews
    • None
    • Windows, MSVC 2019 x64
    • Windows

    Description

      When I migrating my project from QT5.15.2 to QT6.0.2, I found that QFileIconProvider return null in QT6.0.2 but return file icon in QT5.15.2, so I write a small project to test it.

       

      simple code here:

      QPixmap FrmMain::GetICON(const QString &path) {
        QFileIconProvider provider;
        auto icon = provider.icon(QFileInfo(path));
        return icon.pixmap(icon.availableSizes().last());
      }
      

       

      This function return file icon in QT5.15.2, but return null in QT6.0.2.

       

      Attachments

        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
            xlink32 jd w
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes