Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. MacOS file system icons have changed
Forum Update on Monday, May 27th 2025

MacOS file system icons have changed

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 6 Posters 519 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #2

    Hi,

    Which version of Qt are you rubbing ?
    On which version of macOS ?

    Interested in AI ? www.idiap.ch
    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Rory_1
      wrote on last edited by
      #3

      Sonoma 14.5.
      Qt 6.7.2, 6.7, 6.5.3, 6.4.0, 6.2.0 all same behavior.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SimonSchroeder
        wrote on last edited by
        #4

        You could try to use the native file dialog (it's an option in QFileDialog).

        R 1 Reply Last reply
        0
        • R Rory_1

          My application used to show system icons like this running in MacOS:

          1.png

          Since sometime after Qt 6.0 they now look like this:

          2.png

          Has this change originated with a change in MacOS or Qt? If I run my application in Windows I get the expected windows file system icons.

          I can replicate this behavior with a minimal example:

          FileExplorer.pro

          QT += core gui widgets
          SOURCES += main.cpp
          

          main.cpp

          #include <QApplication>
          #include <QMainWindow>
          #include <QTreeView>
          #include <QFileSystemModel>
          #include <QVBoxLayout>
          
          class Explorer : public QMainWindow {
          
          public:
              Explorer(QWidget *parent = nullptr) : QMainWindow(parent) {
                  QFileSystemModel *fileSystemModel = new QFileSystemModel(this);
                  fileSystemModel->setRootPath(QDir::rootPath());
          
                  QTreeView *treeView = new QTreeView(this);
                  treeView->setModel(fileSystemModel);
                  treeView->setRootIndex(fileSystemModel->index(QDir::homePath()));
                  treeView->setSortingEnabled(true);
          
                  QWidget *centralWidget = new QWidget(this);
                  QVBoxLayout *layout = new QVBoxLayout(centralWidget);
                  layout->addWidget(treeView);
                  setCentralWidget(centralWidget);
          
                  setWindowTitle("File System Explorer");
                  resize(800, 600);
              }
          };
          
          int main(int argc, char *argv[]) {
              QApplication app(argc, argv);
              Explorer explorer;
              explorer.show();
              return app.exec();
          }
          

          3.png

          MacOS does not appear to have changed as this is what I see in the finder:

          4.png

          Thanks in advance for any guidance.

          artwawA Offline
          artwawA Offline
          artwaw
          wrote on last edited by
          #5

          @Rory_1 Hi, I built your code.

          cc7d00ad-8f33-4aa4-b5d3-c0194eb2a4ee-image.png

          File icons are OK, folder icons are somewhat "generic". Looks like model gets its decoration role from a different source? I only have the Qt 6.7.2 here so I trust you when you say it's same for different versions. That would also imply something changed in OS libraries from where the Qt gets the icons?

          For more information please re-read.

          Kind Regards,
          Artur

          R 1 Reply Last reply
          0
          • artwawA artwaw

            @Rory_1 Hi, I built your code.

            cc7d00ad-8f33-4aa4-b5d3-c0194eb2a4ee-image.png

            File icons are OK, folder icons are somewhat "generic". Looks like model gets its decoration role from a different source? I only have the Qt 6.7.2 here so I trust you when you say it's same for different versions. That would also imply something changed in OS libraries from where the Qt gets the icons?

            R Offline
            R Offline
            Rory_1
            wrote on last edited by
            #6

            @artwaw Thanks for verifying my results.

            1 Reply Last reply
            0
            • S SimonSchroeder

              You could try to use the native file dialog (it's an option in QFileDialog).

              R Offline
              R Offline
              Rory_1
              wrote on last edited by
              #7

              @SimonSchroeder Thanks for the suggestion Simon. My application subclasses QFileSystemModel in order to show the user the count of images in a folder, and displays the QTreeView in a QDockWidget, so using QFileDialog is not going to work. I could substitute the native icons in the QFileSystemModel data update, but I'm hoping for a better solution.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #8

                It seems that 6.6.3 is not suffering from that issue but indeed 6.7.2 does.

                A build from the dev branch however is showing things correctly again so it might already be fixed for 6.8.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                R 1 Reply Last reply
                0
                • SGaistS SGaist

                  It seems that 6.6.3 is not suffering from that issue but indeed 6.7.2 does.

                  A build from the dev branch however is showing things correctly again so it might already be fixed for 6.8.

                  R Offline
                  R Offline
                  Rory_1
                  wrote on last edited by
                  #9

                  @SGaist Thanks!! I'll mark this as solved.

                  1 Reply Last reply
                  0
                  • R Rory_1 has marked this topic as solved on
                  • R Offline
                    R Offline
                    Rory_1
                    wrote on last edited by
                    #10

                    Followup: Qt 6.8 beta 2 does indeed resolve this issue. Many thanks to the Qt team.

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      Ghenady
                      wrote on last edited by
                      #11

                      Noticed this on Windows. Is there a way to switch between native icons and those custom? They suit nice on dark theme with Fusion style.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        Steven_314
                        wrote last edited by
                        #12

                        Seeing this behavior on Windows with 6.8.3, was there a QTBUG tracking this behavior and/or fix that may have more information?

                        1 Reply Last reply
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved