[PyKDE] Problem resolving widget's class
David Boddie
david at boddie.org.uk
Tue Nov 2 17:37:13 GMT 2004
On Tue Nov 2 16:34 2004, Fredrik Juhlin wrote:
> On Tuesday 02 November 2004 16.07, David Boddie wrote:
> 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 just get a segmentation fault. This is where we need to establish which
versions of PyQt and SIP you're using. I'm using Python 2.3.4 with PyQt 3.13
and SIP 4.0.
> > 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.
Yes, I just noticed that. Even if I close the widget then delete the oldFile
variable, it still leaks memory. I'll try to think of a way to deal with
that.
David
___________________________________________________________
$0 Web Hosting with up to 120MB web space, 1000 MB Transfer
10 Personalized POP and Web E-mail Accounts, and much more.
Signup at www.doteasy.com
More information about the PyQt
mailing list