[PyKDE] Dualing Qt libraries...

Phil Thompson phil at river-bank.demon.co.uk
Sun Sep 30 14:35:28 BST 2001


Erik Weber wrote:
> 
> Dear List,
> 
> I have an application that runs on Windows and uses embedded Python.  The
> application also uses Qt.  When I run scripts that access libqtc.dll, the
> windows appear but do not repaint.  I believe this is because there are
> dualing QApplication objects, one accessed by the application and another
> accessed by libqtc.

Are you explicitly creating two instances of QApplication - one in your
app and one in your scripts? If so, try using the qApp pointer in your
scripts instead of calling the QApplication ctor so that the scripts use
the existing QApplication instance. You'll lose some functionality -
access to QApplication protected methods and not being able to sub-class
QApplication in a script.

> How can I modify libqtc and sip to be linked directly to my executable so
> that there are no duplicate resource conflicts?  Which files in the sip and
> libqtc projects would need to be modified?
> 
>   -Erik Weber
>    Lineo Seattle
>    206.285.2506 x204
>    Lineo: Where Open Meets Smart

Phil




More information about the PyQt mailing list