[PySide] model/view: using fetchmore with scroll bar and filter proxy

Frank Rueter | OHUfx frank at ohufx.com
Tue Aug 30 22:35:22 CEST 2016


    
Anybody?


-------- Original message --------
From: Frank Rueter | OHUfx <frank at ohufx.com> 
Date: 27/08/2016  5:23 PM  (GMT+12:00) 
To: pyside at qt-project.org 
Subject: [PySide] model/view: using fetchmore with scroll bar and filter proxy 


    Hi all,

    

    I'm implementing a model using fetchMore, to retrieve data from a
    model on demand, which in my case means the model fetches more data
    as the user scrolls down a QListView.

    Technically this works just fine, except that the scrollbar adjusts
    it's width every time it hits the bottom, to accommodate the
    increase in rowCount.

    I suppose I need to re-implement some methods to take over control
    of the view's verticalScrollbar(), but I'm not quite sure how.

    I suspect I should use the view's resizeEvent to set a static range
    for my scrollbar, but I also need to make it stop adjust itself
    every time fetchMore is called by the model.

    Has anybody ever done this?

    

    Also, is anybody aware of examples that show the use of a
    QAbstractListModel (or QAbstractItemModel in general) which deploys
    the fetchMore logic along a QSortFilterProxyModdel?

    

    Currently my filter results are quite unexpected after implementing
    fetchMore and I'm not quite sure where to start to fix this.

    

    Any pointers would be much appreciated.

    

    Cheers,

    frank

    

    

    -- 

      
        
          
            
            vfx
                    compositing | workflow
                      customisation and consulting 
              
          
        
      
    
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20160831/339d42bf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ohufxLogo_50x50.png
Type: image/png
Size: 2666 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20160831/339d42bf/attachment.png>


More information about the PySide mailing list