Open nicoddemus opened 9 years ago
Did you actually test this with PyQt4/PyQt5 or just assumed it worked because of my model tester code (which uses sip.cast
to circumvent this)? Your snippet fails for me with TypeError: QAbstractListModel.columnCount() is a private method
with PyQt4/PyQt5 as well. :wink:
Also, those methods definitely are private in Qt, so I don't think PySide is to blame here - except for not having a sip.cast
equivalent :wink:
Sorry, you are correct, the snippet does fail in PyQt4 and 5 as well... I got mislead by the documentation, but indeed the C++ header explicitly mark those functions as private. :frown:
I agree this is not a bug but is there any workaround for that problem in Pride?
Hi there!
First of all thanks for the excellent Qt4 bindings! :smile:
I'm the author of the pytest-qt plugin for pytest, and I'm currently working on creating a Python version of ModelTest.
I'm having some trouble testing a
QStringListModel
instance because it doesn't seem to provide all the public methods it should as aQAbstractListModel
subclass. For example, the docs forQAbstractListModel
explicitly say:But the snippet below:
Fails with this error:
I see the same issue with
parent()
andhasChildren()
methods.The same snippet works fine for
PyQt4
andPyQt5
.Is this a known issue? Is there any workaround?
Cheers, :beers: