Results 1 to 20 of 21

Thread: SelectAll causes freeze

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: SelectAll causes freeze

    You can probably use the canFetchMore() and fetchMore() feature of the model to do it without timers.

  2. #2
    Join Date
    Nov 2007
    Posts
    51
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default Re: SelectAll causes freeze

    I use the treeview currently as a tableview, i.e. only top level items, no children.
    I've never used canFetchMore() and fetchMore(), could you please explain a bit how it can help?

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: SelectAll causes freeze

    The view is irrelevant, it all happens inside the model. canFetchMore() is called to ask whether the model needs to update itself with new rows and fetchMore() does the update.

    In your case canFetchMore() should return true if there are any pending rows and fetchMore() should append them to the model. I don't know if it will work (I never used those two methods), but it's worth to try. At worst you'll have to call those two methods yourself from within the timer.

Similar Threads

  1. QLineEdit selectAll() in eventFilter
    By mclark in forum Qt Programming
    Replies: 6
    Last Post: 1st February 2008, 08:13
  2. QThread , GUI freeze
    By cs_raja in forum Qt Programming
    Replies: 4
    Last Post: 19th November 2006, 10:47
  3. Replies: 4
    Last Post: 10th November 2006, 12:07
  4. QTable Freeze Column
    By sunil.thaha in forum Qt Programming
    Replies: 3
    Last Post: 25th April 2006, 04:21

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.