[PyKDE] Typecasting problems with PyQt embedded in Scribus

Henning Schröder henning.schroeder at gmail.com
Thu Jun 30 01:16:19 BST 2005


Hi!

Scribus is a free DTP application which is coded in C++ and Qt and
provides scripting
with Python.
A Python script can import the qt module and access the data from the
running application as far as it is reachable with the Qt-object
system (qApp.children(), ..)

Unfortunately automatic typecasting does not always work as expected. 
For example when I access qt.qApp.mainWidget() I get a QWidget. But
the main widget is a ScribusWin-class which is derived from
QMainWindow. So I expected  I can get a QMainWindow.

Instead of writing my own SIP-wrapper for ScribusWin I would like
better typecasting.
Is this possible or can I do it manually?


Greets 
Henning




More information about the PyQt mailing list