Results 1 to 2 of 2

Thread: QTreeView + QFileSystemModel = VERY slow on some Windows machines

  1. #1
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Question QTreeView + QFileSystemModel = VERY slow on some Windows machines

    Hi,

    I have a QTreeView-based widget which I use to have some kind of a file browser within my application. Apart from a couple of initialisation problems, everything works I expect on Windows, Linux and Mac OS X, except for the fact that on my work machine, it takes several seconds for my QTreeView-based widget to initialise. I believe the problem might be related to QFileSystemModel taken for ever. In fact, I have experienced very long delays with Windows Explorer on Windows machine in the past (not on my current work computer though). Still, the user experience is really bad and I was therefore wondering whether anyone had ever experienced that before and, if so, whether they had found a solution to that problem?

    Cheers, Alan.

  2. #2
    Join Date
    Mar 2010
    Posts
    319
    Thanks
    1
    Thanked 14 Times in 12 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTreeView + QFileSystemModel = VERY slow on some Windows machines

    I still don't have a solution to my problem, but the culprit is setRootPath() which I call as follows:
    Qt Code:
    1. mFileSystemModel->setRootPath("");
    To copy to clipboard, switch view to plain text mode 
    i.e. wanting access to the whole file system. If I disable that line, everything is fine. I am really starting to think that it's a pure Windows problem though...

    I still don't have a solution to my problem, but the culprit is setRootPath() which I call as follows:
    Qt Code:
    1. mFileSystemModel->setRootPath("");
    To copy to clipboard, switch view to plain text mode 
    i.e. wanting access to the whole file system. If I disable that line, everything is fine. I am really starting to think that it's a pure Windows problem though...


    Added after 51 minutes:


    For what it is worth, I can now confirm that the problem was with Windows. There is a useful article about What to Do if Windows Explorer is Slow to Respond? Personally, I followed their suggestion on page 2 under the Advanced Tweaks for a Windows Explorer Slow to Respond Problem section and now, after rebooting my work computer, everything is fine.
    Last edited by agarny; 21st February 2011 at 17:34.

Similar Threads

  1. Replies: 7
    Last Post: 13th February 2014, 06:23
  2. Select all items in QTreeView. Why very slow ?
    By MaxBooster in forum Qt Programming
    Replies: 0
    Last Post: 25th August 2010, 06:12
  3. Replies: 3
    Last Post: 17th August 2010, 17:58
  4. Replies: 0
    Last Post: 20th July 2010, 14:55
  5. Qt4, slow on windows ?
    By eto.ethome.sk in forum Qt Programming
    Replies: 3
    Last Post: 28th May 2009, 00:34

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.