[PyQt] Re: ConvertToSubClass problem
Matt Newell
newellm at blur.com
Wed Nov 19 17:20:19 GMT 2008
On Wednesday 19 November 2008 03:05:50 Matteo Bertini wrote:
> Matt Newell ha scritto:
> > Could you be more specific about the situation that is failing. What
> > actual type is the object, and what is the return type of the function
> > being called?
> >
> > Matt
>
> matteo at focault:~/src$ cat bug_q3listview.py
>
> import sys
> from PyQt4.Qt import *
>
> if __name__ == "__main__":
> a = QApplication([])
> w = Q3ListView()
> w.addColumn("prova")
> i = Q3ListViewItem(w, "row1")
> print i, w.firstChild()
> print w, i.listView()
> w.show()
> #a.exec_()
>
> ### before the IsSubtype Fix
>
> matteo at focault:~/src$ python bug_q3listview.py
> bug_q3listview.py:7: DeprecationWarning: Q3ListView constructor is
> deprecated
> w = Q3ListView()
> bug_q3listview.py:9: DeprecationWarning: Q3ListViewItem constructor is
> deprecated
> i = Q3ListViewItem(w, "row1")
> <PyQt4.Qt3Support.Q3ListViewItem object at 0x7f80e1b08628>
> <PyQt4.Qt3Support.Q3ListViewItem object at 0x7f80e1b08628>
> <PyQt4.Qt3Support.Q3ListView object at 0x7f80e1b085a0>
> <PyQt4.QtGui.QFrame object at 0x7f80e1b086b0>
> ^^^^^^
> ## After the fix
>
> matteo at focault:~/src$ python bug_q3listview.py
> bug_q3listview.py:7: DeprecationWarning: Q3ListView constructor is
> deprecated
> w = Q3ListView()
> bug_q3listview.py:9: DeprecationWarning: Q3ListViewItem constructor is
> deprecated
> i = Q3ListViewItem(w, "row1")
> <PyQt4.Qt3Support.Q3ListViewItem object at 0x7f8f31eec628>
> <PyQt4.Qt3Support.Q3ListViewItem object at 0x7f8f31eec628>
> <PyQt4.Qt3Support.Q3ListView object at 0x7f8f31eec5a0>
> <PyQt4.Qt3Support.Q3ListView object at 0x7f8f31eec5a0>
> ^^^^^^^^^^
>
Thanks.
The actual bug is in q3frame.sip.
class Q3Frame : QWidget
should be
class Q3Frame : QFrame
as it is in qt's header files.
Matt
More information about the PyQt
mailing list