From pykde Mon Nov 22 14:58:32 2004 From: "Hihn, Jason" Date: Mon, 22 Nov 2004 14:58:32 +0000 To: pykde Subject: [PyKDE] Windows not working when embedded. Message-Id: X-MARC-Message: https://marc.info/?l=pykde&m=110113619713883 MIME-Version: 1 Content-Type: multipart/mixed; boundary="------_=_NextPart_001_01C4D0A3.BBFAC2D9" This is a multi-part message in MIME format. --===============0536756523== content-class: urn:content-classes:message Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C4D0A3.BBFAC2D9" This is a multi-part message in MIME format. ------_=_NextPart_001_01C4D0A3.BBFAC2D9 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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. =0D 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. =0D Here's my code: =0D char statements[][80]=3D{ "import sys\n", "sys.path.append('C:\\Python23\\Lib\\site-packages')\n", "from qt import *\n", "from qtui import *\n", =0D "a=3DQApplication(sys.argv)\n", "a.connect(a, SIGNAL(\"lastWindowClosed()\"), a, SLOT(\"quit()\"))\n", "x=3DQDialog()\n", "x.show()\n", "a.exec_loop()\n"}; PyObject *err; =0D for (int i=3D0; i

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]=3D{

"import= sys\n",

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

"from qt import= *\n",

"from qtui import= *\n",

 

"a= =3DQApplication(sys.argv)\n",

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

"x= =3DQDialog()\n",

"x.show()\n",<= /span>

"a.exec_loop()\n"};<= /o:p>

PyObject *err;

 

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

         &n= bsp;  PyRun_SimpleString(statements[i]);

         &n= bsp;  err=3DPyErr_Occurred();

         &n= bsp;  if (err)

         &n= bsp;            = ;  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)
------_=_NextPart_001_01C4D0A3.BBFAC2D9-- --===============0536756523== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde --===============0536756523==--