Hi. I am writing a simple file manager in C ++ and Qt as an exam assignment. QFileSystemModel is displayed in the QListView as text strings, without folder and file icons. I have the following code:
Qt Code:
ui->setupUi(this); model_Main = new QFileSystemModel(this); model_Main->setRootPath(""); model_Main->setIconProvider(MyIconProvider); ui->listViewMain->setModel(model_Main);To copy to clipboard, switch view to plain text mode
This QFileIconProvider works on Windows 10 (folder and file icons are displayed as default in QListView), but does not work on MacOS 10.14 and 11.4 (The icons are not displayed by default. It is possible to check only on these versions). What needs to be done to make the code work on MacOS?
Bookmarks