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

Unable to get file icon by QFileIconProvider()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Fixed
    • Affects Version/s: 6.0.2
    • Fix Version/s: None
    • Component/s: Widgets: Itemviews
    • Labels:
      None
    • Environment:
      Windows, MSVC 2019 x64
    • Platform/s:
      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

            Assignee:
            qt.team.quick.subscriptions Qt Quick and Widgets Team
            Reporter:
            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