[PySide] model/view: using fetchmore with scroll bar and filter proxy
Frank Rueter | OHUfx
frank at ohufx.com
Sat Aug 27 07:23:07 CEST 2016
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
--
ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing
<http://ohufx.com/index.php/vfx-compositing> | *workflow customisation
and consulting <http://ohufx.com/index.php/vfx-customising>* *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20160827/c001b55d/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/20160827/c001b55d/attachment.png>
More information about the PySide
mailing list