[PyKDE] Problem resolving widget's class
Fredrik Juhlin
laz at strakt.com
Wed Nov 3 07:43:29 GMT 2004
On Tuesday 02 November 2004 18.37, David Boddie wrote:
> 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.
As I stated in my initial mail, I run SIP 4.1.1, PyQt 3.13 and Python 2.3.3.
I looked at my test code and the more I thought of it, the more convinced I
got that using close(1) should be OK. But I rewrote it to use close() and
deleteLater(). Since deleteLater() defers the delete, that should be safe
enough.
Running the new version, the error actually occurs sooner than before for me.
I attached the updated test.py to this mail, it would great if you could try
it and see if the error can be reproduced by you now.
//Fredrik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: application/x-python
Size: 2098 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20041103/cefae2fb/test.bin
More information about the PyQt
mailing list