[PyQt] moving from pyside, subclass problem
Alan Ezust
alan.ezust at gmail.com
Wed Jul 23 18:50:27 BST 2014
Are you also changing from Python 2 to Python 3?
Check the QFavorislistModel.__init__() def and make sure that
super(QAbstractItemModel, self).__init__(parent) is called properly from
it.
On Mon, Jul 21, 2014 at 3:16 AM, pisani arnaud <arnaud at pixels-universe.com>
wrote:
> Hi,
> I’ m moving some scripts from pyside 1.2 to pyqt4 and have some problems
> with subclass:
>
> I’ ve got a QListView that use a subclass of QAbstractListModel as model.
> With pyside evrything is ok, with pyqt4 i’ve got this error when set the
> model :
>
> TypeError: QAbstractItemView.setModel(QAbstractItemModel): argument 1 has
> unexpected type ‘QFavorislistModel’
>
> It’ s like my subclass of QAbstractListModel ‘QFavorislistModel’ is not
> reconized as a QAbstractItemModel.
>
> I don’t understand what wrong and what are the differneces between pyside
> and pyqt,
> If somone can highlight me,
> Thanks
> Arnaud
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140723/c9865a59/attachment.html>
More information about the PyQt
mailing list