Results 1 to 11 of 11

Thread: filterAcceptRows() is being called for all the top level items in the tree.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2013
    Location
    Bangalore
    Posts
    49
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: filterAcceptRows() is being called for all the top level items in the tree.

    Quote Originally Posted by wysota View Post
    How would you determine the size of the scrollbar then?
    I am not sure exactly, but we can get a signal when we move a scroll bar, I thought of doing it by catching that signal.

    If it is not possible, You could suggest some other way as well :-)

    @ChrisW67 : we have tried by applying filter on data base this is also taking much time, so I am searching for the solution (like lazy loading I want lazy filtering )

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

    Default Re: filterAcceptRows() is being called for all the top level items in the tree.

    Quote Originally Posted by DURGAPRASAD NEELAM View Post
    I am not sure exactly, but we can get a signal when we move a scroll bar, I thought of doing it by catching that signal.
    Where would you move the scrollbar if you don't know how many entries the model has? If the model filtered only until the view was populated with visible items the scroll bar would think there were no more items available and the scroll bar would not be visible.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Jan 2013
    Location
    Bangalore
    Posts
    49
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: filterAcceptRows() is being called for all the top level items in the tree.


    1. Is it possible to call this function only for the items which are visible currently in a view & then when I scroll down Apply same filter for newly brought items into view ?

    2. If it is not possible, You could suggest some other way as well :-)

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

    Default Re: filterAcceptRows() is being called for all the top level items in the tree.

    Quote Originally Posted by DURGAPRASAD NEELAM View Post
    [SIZE=4]
    [B] 1. Is it possible to call this function only for the items which are visible currently in a view & then when I scroll down Apply same filter for newly brought items into view ?
    Yes. Subclass QAbstractProxyModel and implement your own proxy.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Level of an item QStandardItemModel for tree
    By mqt in forum Qt Programming
    Replies: 1
    Last Post: 3rd October 2013, 09:21
  2. QTreeWidget::findItems only searches top level items ?
    By krisha in forum Qt Programming
    Replies: 3
    Last Post: 27th October 2011, 08:28
  3. Replies: 2
    Last Post: 9th June 2011, 11:20
  4. filterAcceptRows() is being called many times for same souceRow.
    By kaushal_gaurav in forum Qt Programming
    Replies: 2
    Last Post: 19th February 2009, 03:49
  5. Crash while checking the index is of particular level of a tree
    By kapil sharma in forum Qt Programming
    Replies: 1
    Last Post: 27th November 2008, 07:21

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
  •  
Qt is a trademark of The Qt Company.