[PyQt] QAbstractListModel & QMl ListView: Invisible Items

Jonas Schürmann jonasschuermann at aol.de
Mon Feb 16 19:54:12 GMT 2015


Hello,

I got a really strange problem and I don't know how to tackle it.

What I'm trying to archive is simple: Using a subclassed QAbstractListModel to 
provide data to a QML ListView.

The problem is, that only the first item in the ListView is visible, all the 
other items are there and take up space (I can scroll down the list), but they 
are not visible.
You can find a WebM of the behaviour I got here: [1]

I have no idea how this can happen, to me it looks like a bug in PyQt.

I'm attaching the two source files that reproduce the error for me.
If somebody else could reproduce the bug or give me some pointers how this can 
happen, I would be very glad.

Regards,
Jonas Schürmann

[1] http://gfycat.com/OffensiveShinyHagfish
-------------- next part --------------
A non-text attachment was scrubbed...
Name: app.py
Type: text/x-python
Size: 1137 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150216/35cdb2e7/attachment.py>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modeltest.qml
Type: text/x-qml
Size: 492 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150216/35cdb2e7/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20150216/35cdb2e7/attachment.sig>


More information about the PyQt mailing list