Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Possible Qt 6.03 Bug



  • I elevate my project to QT 6.03 and now I recognized that my TreeWidget do not show Icons by QFileIconProvider.
    I rechecked the same code with 5.15.2 and the same code works.

      QFileIconProvider iconprovider;
      QIcon icon = iconprovider.icon(fileinfo);
      setIcon(0, icon);
    

    On QT this icon is always not shown. A default icon loaded from resource works well, too. So I assume that QFileIconProvider has a bug.
    Maybe someone can confirm?

    I use:
    Windows 10
    VisualStudio 2019 64bit compiler
    QT 6.03 Debug

    Rechecked with:
    Windows 10
    VisualStudio 2019 64bit compiler
    QT 5.15.2



  • Bug is confirmed.
    QTBUG-91104 is the general issue being worked, QTBUG-92030 is your specific case.

    If you need a workaround (works in the current dev branch) you can set up a custom theme to hold the icons you want to use.

    See this example on how to setup a custom theme.
    The icons you need to provide are:

    • "computer"
    • "user-desktop"
    • "user-trash"
    • "network-workgroup"
    • "drive-harddisk"
    • "folder"
    • "text-x-generic"

    You could use Breeze or Oxygen icons from KDE if you need them


Log in to reply