QDirModel/QTreeView performance under win32
Hello. I'm using Qt 4.4, QTreeView with QDirModel to show a files tree. On Linux it works fast. But on Windows XP SP2, the QTreeView filled with a root directory content (C, D, etc., and cdroms) are freezes at start, then shows me a tree in about a 1 or 1.5 minutes. Is that a normal behavior of QTreeView/QDirModel?
Note 1: there are FAT32 and NFTS partitions.
Note 2: can I disable the standart icons set QTreeView/QDirModel and does that affect the performance?
Re: QDirModel/QTreeView performance under win32
An improved version of QDirModel, namely QFileSystemModel was introduced in Qt 4.4.
Re: QDirModel/QTreeView performance under win32
Thank you! But now I have a new problems :) When I changed the model to QFileSystemModel, I've found some strange things with my code (but all compiles well).
Here is an actual code of the function that does navigate QTreeView/QFileSystemModel to the directory at the QString path parameter. mvl_model is QFileSystemModel, tv_fman is QTreeView:
Code:
void rvln
::fman_nav (const QString &path
) {
if (! i.isValid())
return;
tv_fman->setCurrentIndex(i);
tv_fman->setExpanded (i, true);
}
When I call tv_fman->setCurrentIndex, treeview selects the item. Thats normal. Then I call setExpanded - but it doesn't works. And scrollTo - the same thing, doesn't work.