[PyKDE] Problem resolving widget's class
Fredrik Juhlin
laz at strakt.com
Tue Nov 2 15:34:01 GMT 2004
On Tuesday 02 November 2004 16.07, David Boddie wrote:
> I ran the test program that you posted in another message
> (http://mats.imk.fraunhofer.de/pipermail/pykde/2004-November/008977.html)
> and found that it always crashed the second time I clicked the update
> button.
That's weird. I can run it for some time without getting an error.
Do you get an error such as this:
label label_test_17 (<__main__.qt.QWidget object at 0x400970ec>) isn't a
QLabel
Traceback (most recent call last):
File "test.py", line 39, in updateView
self._updateLabels()
File "test.py", line 60, in _updateLabels
label.setText(label.name())
AttributeError: setText
Or do you get a different error all together?
> I changed oldForm.close(1) in line 33 of test.py to oldForm.close() and
> experienced no crashes for the admittedly short time that I ran it again.
> I think that the problem may be that you're instructing Qt to delete the
> objects on the C++ side, and SIP isn't too happy about this later on.
Unfortunately, doing that leaks memory for me (probably every instance of the
form that is created.) Maybe I wrote the test too quickly, I'll see if I can
rewrite it in a better way.
//Fredrik
More information about the PyQt
mailing list