[review] Re: [PyKDE] Embedded python
Kevin Schmidt
kevin at eyesopen.com
Wed Jun 2 15:28:00 BST 2004
Another small bit of information:
I can run the following code:
from qt import *
q=QObject()
print q.parent()
The result is None, of course. However, if I try:
from qt import *
q=QObject()
p=QObject(p)
print p.parent()
It crashes when I try to compile (via Py_CompileString(c_line, "",
Py_single_input)) the "print p.parent()" line.
Kevin
Jim Bublitz wrote:
> On Tuesday 01 June 2004 07:16, Kevin Schmidt wrote:
>
>>So I have looked a bit more closely and I still can't figure out what is
>>going on. Here's the short of it:
>
>
>>1. I can import qt just fine. I can use the qApp object to resize,
>>hide, etc, the main window
>
>
>>2. I can create QObjects with no parents. No problems.
>>3. I can create QObjects with qApp.mainWidget() as the parent.
>>4. If I try to create by:
>>w=QObject()
>>w2=QObject(w)
>
>
>>it crashes on the NEXT time through my python interpreter.
>>5. If I try to create a defaultly constructed QWidget (or QDockWindow,
>>probably others), it crashes on the NEXT time through my python
>>interpreter.
>
>
>>Any ideas folks?
>
>
> I'm not sure I can help, but can you go through how this is all loaded/linked?
> For example, is libpython linked staticly or dynamicly or loaded on demand; if
> linked, did you use -Wl,E when linking, how Python gets qApp, etc.?
>
> Jim
More information about the PyQt
mailing list