[PyQt] Incorrect base for wrapped class

Phil Thompson phil at riverbankcomputing.co.uk
Tue Jul 3 16:38:46 BST 2007

On Tuesday 03 July 2007 4:05 pm, Kelly Burkhart wrote:
> Greetings,
> I am trying to wrap QAbstractTableModel.  When I instantiate my code,
> it shows an incorrect base class:
> >>> from PyQt4 import QtGui, QtCore
> >>> from ecn.gui.log_view_model_base import LogViewModelBase
> >>> print LogViewModelBase.__base__
> <class 'PyQt4.QtCore.QProcess'>
> LogViewModelBase is a sip wrapper of a trivial class derived from
> QAbstractTableModel.  I have no idea how QProcess gets chosen as a
> base (incidentally, if I derive from QAbstractItemMode, QIODevice is
> chosen as base).
> Can anyone provide a hint as to what I am doing wrong or failing to
> specify?  Thanks!

This typically happens when a different version of SIP has been used to build 
the different modules, or a different set of PyQt .sip files were used.

Try rebuilding all the SIP generated modules.


More information about the PyQt mailing list