[PyKDE] Typecasting problems with PyQt embedded in Scribus

Phil Thompson phil at riverbankcomputing.co.uk
Thu Jun 30 09:58:48 BST 2005


On Thursday 30 June 2005 1:16 am, Henning Schröder wrote:
> 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?

This was discussed on the list yesterday in another context. The next PyQt 
snapshot should have the behaviour you are expecting.

Phil




More information about the PyQt mailing list