hello ,everyone!
I am new member in Qt programing,now, I have a problem with the QTreeView.
the question is:when I set the QTreeView's model with QDirmodel,then ,the program's speed is very slow and the harddisk has the "gege" noise,why?
thanks !
hello ,everyone!
I am new member in Qt programing,now, I have a problem with the QTreeView.
the question is:when I set the QTreeView's model with QDirmodel,then ,the program's speed is very slow and the harddisk has the "gege" noise,why?
thanks !
Sample of code I could compile and test, maybe ?
I use this combination here with Qt 4.3, and it works fine
In Qt4.3 the dir model behaviour was changed - the directory scan has been delayed until the respective branch of the tree is accessed.
In older releases the initial slowdown is caused by the model subtree being built (all the directories are scanned).
thandks for your answer!
the Qt I am used is Qt4.2.3,and the OS is WindowsXP; According to your reply,how can I deal with the question?Can I set the directory path in QModel before the program run?So,it can reduce the scan time。
thanks a lot!
when I do this :
QDirmodel* dmodel=new QDirmodel;
dmodel->setreadonly(true);//If the paramenter is false ,then the speed is very slow.
then the program's speed is as fast as before;why? help me!
It could be that the model is asking the filesystem for read/write permissions and that it's kind of slow on your system. Do you need your model to be rewritable?
yes,I want to change the model? for example,change a file's name.
Have you given Qt 4.3 a try?
J-P Nurmi
i have this problem
any one cant't help me?
Bookmarks