[PySide] class not found for setup inheritance 'QGraphicsObject'

Peter Zion Peter.Zion at fabricengine.com
Wed Dec 16 16:22:13 CET 2015


Hi there,

Apologies if this question has already been answered; I searched the archives at gmane and I couldn’t find an answer.

I am trying to wrap a fairly extensive Qt widget library with Shiboken (1.2.4) to expose it to PySide (1.2.4, built against Qt open-source 4.8.7).  I have hit the problem that one of the widgets that needs to be exposed (call it MyGraphicsWidget) inherits from QGraphicsWidget, and Shiboken generates incorrect code that will not compile.  Indeed, Shiboken complains about QGraphicsWidget when it runs:

class not found for setup inheritance 'QGraphicsObject'
class 'QGraphicsWidget' inherits from unknown base class ‘QGraphicsObject'
class 'QGraphicsTextItem' inherits from unknown base class ‘QGraphicsObject'

Everything else in Qt is fine, coming from our inclusion of the PySide typesystem files we need:

  <load-typesystem name="typesystem_core.xml" generate="no"/>
  <load-typesystem name="typesystem_gui_common.xml" generate="no"/>
  <load-typesystem name="typesystem_gui.xml" generate="no"/>
  <load-typesystem name="typesystem_opengl.xml" generate="no"/>

I have this same problem on Linux and OS X, so it looks like the problem itself may be with PySide (or Shiboken) and not with the platform.

It’s unclear to me what the problem is with QGraphicsObject; it seems to be explicitly included in typesystem_gui_common.xml.  Does anyone have any suggestions about how Shiboken can be directed to correctly find QGraphicsObject?

Peter Zion
Fabric Engine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20151216/c104b0f4/attachment.html>


More information about the PySide mailing list