Results 1 to 2 of 2

Thread: QFileSystemModel is sorting data which is hanging GUI

  1. #1
    Join Date
    May 2019
    Posts
    1
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default QFileSystemModel is sorting data which is hanging GUI

    Hi,

    I am working on a project where it uses QFilesystemModel with QTableView to display data present in network share. Recently we moved from Qt 4.8 to Qt 5.11.3. After moving to 5.11.3, we are facing performance issues with QFilesystemModel with around 1500-2000 entries in the network share. It is using QSortFilterProxyModel to sort and filter some entries.

    The view is taking time in sorting the data. To avoid that, I removed the QSortFilterProxyModel from my code. But it is still sorting the data and taking time causing the GUI hang. I even disabled sorting in QTableView using setSortingEnabled(false) but with no use. I am not sure how the data is being sorted.

    Is there anyway to improve performance with QFilesystemModel? How to disable sorting with QFilesystemModel/QTableView?

    I am a little bit confused as I am a newbie to QT programming. Any help is much appreciated.

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Bremen, Germany
    Posts
    554
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QFileSystemModel is sorting data which is hanging GUI

    Since QFilesystemModel does not sort by itself the reason can't be the sorting but something else. Therefore I would suggest to create a small example and use a profiler like e.g. valgrind/callgrind to see where the cpu spend it's time.

Similar Threads

  1. QFileSystemModel and custom column / data
    By ArnSpin in forum Newbie
    Replies: 4
    Last Post: 2nd March 2015, 13:07
  2. QFileSystemModel: creating custom rows of data
    By masterlaws in forum Qt Programming
    Replies: 3
    Last Post: 12th August 2013, 12:58
  3. Problem in getting data using QFileSystemModel
    By chinmayapadhi in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2010, 20:34
  4. sorting Data in QTable
    By sosanjay in forum Qt Programming
    Replies: 6
    Last Post: 24th October 2009, 02:21
  5. QFileSystemModel has no sorting
    By mpi in forum Qt Programming
    Replies: 3
    Last Post: 28th May 2009, 09:14

Tags for this Thread

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.