Solved Qt 5.12 QListView text not showing when using setUniformItemSizes
-
Hello I'm having an issue in Qt 5.12 using QListView with QFileSystemModel. When I use setUniformItemSizes(true) on the listview some items don't show the text label but in others it looks like it is aligned outside of the item and clipped.
The result in Qt 5.12:
The result in Qt 5.6:
Edit:
I'm using Windows 8,1 64 bits.Code:
#include <QApplication> #include <QFileSystemModel> #include <QListView> int main(int argc, char *argv[]) { QApplication a(argc, argv); QFileSystemModel *filesModel = new QFileSystemModel(); filesModel->setRootPath(""); QListView *listView = new QListView(); listView->setUniformItemSizes(true); listView->setModel(filesModel); listView->setRootIndex(filesModel->index("C:/files")); listView->setViewMode(QListView::IconMode); listView->resize(800,600); listView->show(); return a.exec(); }
-
Hi,
Can you provide a minimal compilable example reproducing that behaviour ?
What OS are you running ?
-
thank you, I added the additional information
-
Unfortunately this is a bug introduced in 5.12, hope to get it fixed until 5.12.2: https://bugreports.qt.io/browse/QTBUG-72869