Mon Sep 20 17:46:52 CEST 2004
On Tue, 2004-09-21 at 00:13, el =?iso-8859-1?q?Sism=F3grafo?=, S.L.
> I have fiddled around with PyQt again and - exactly it doesn't work...
> The funny thing is that Scribus doesn't crash - it closes.
That's odd. Any chance you can provide your test Python code? (mailing
off list would be good).
> Some time ago I read in a book about python gui-toolkits that you can only
> have one instance of QApplication and that this would even go for Qt-Apps
> that use python as a scripting language.
Yep. The solution is that if you import PyQT, it'll find the existing
QApplication instance and provide it as the module attribute 'qApp'. So
you just use the QApplication instance created at Scribus startup.
> Â¿Does that mean that you have to somehow spawn off new windows from the
> running app? how the hack would this work?
Yep, that's right. I'll mail you some sample code. Basically you use the
existing qApplication to create a new window and attach all the slots
and signals. When you display it, qt puts it in its normal event loop.
Unfortunately, there seems to be another problem when that app exists or
the next one starts.
More information about the scribus