[PyKDE] Windows not working when embedded.

Hihn, Jason Jason.Hihn at verint.com
Mon Nov 22 14:58:32 GMT 2004


Ok, I gave up on the idea of making monolithic binary. So I have
everything compiled and installed as usual. I can doubple click the
script, and it works as it should.



I embedded python into my app. Python works. But when I try to run any
pyqt code, nothing happens. The imports seem to work, (having debugged
into python and such) but my app window does not come up.



Here's my code:



char statements[][80]={

"import sys\n",

"sys.path.append('C:\\Python23\\Lib\\site-packages')\n",

"from qt import *\n",

"from qtui import *\n",



"a=QApplication(sys.argv)\n",

"a.connect(a, SIGNAL(\"lastWindowClosed()\"), a, SLOT(\"quit()\"))\n",

"x=QDialog()\n",

"x.show()\n",

"a.exec_loop()\n"};

PyObject *err;



for (int i=0; i<sizeof(statements)/80; i++){

            PyRun_SimpleString(statements[i]);

            err=PyErr_Occurred();

            if (err)

                        PyErr_Print();



}



At no time is PyErr_Print() reached. Yet nothing happens.



Does anyone have an idea? I'm trying to get a window fro python in a
MSVC 6 app.



Thanks!



__________________________________________________________________________________________
This electronic message may contain proprietary and confidential information of Verint Systems Inc., its affiliates and/or subsidiaries.
The information is intended to be for the use of the individual(s) or
entity(ies) named above.  If you are not the intended recipient (or authorized to receive this e-mail for the intended recipient), you may not use, copy, disclose or distribute to anyone this message or any information contained in this message.  If you have received this electronic message in error, please notify us by replying to this e-mail. (1)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20041122/1321220b/attachment.html


More information about the PyQt mailing list