[PyQt] PyQt(3) QDockWindow error
Giovanni Bajo
rasky at develer.com
Wed Mar 28 15:01:51 BST 2007
On 3/28/2007 3:21 PM, V. Armando Sole wrote:
> I have problems with the latest PyQt snapshot (February) and latest sip
> snapshot.
> The problems come from the fact QDockWindow.boxLayout() returns a
> QSpacerItem instead of a QBoxLayout.
>
> At the python promt :
>
> import qt
> app = qt.QApplication([])
> w = qt.QDockWindow()
> w.boxLayout()
>
> <qt.QSpacerItem object at 0x405a882c>
>
> That does not happen with the non snapshot versions of sip and PyQt3. My
> problem is that I need the latest sip snapshots in order to avoid the
> deadlocks in PyQt4 threads and the non-snapshot version of PyQt3 does
> not compile with the latest sip snapshot.
Yes, I had reported this problem to Phil Thompson already. The bug was
introduced with this commit:
2007/02/25 0:19:29 phil
Included Matt Newell's fix for making sure that a sub-class convertor
returns the most specific type available.
You can apply the attached patch to workaround the problem, until Phil
provides the correct fix.
--
Giovanni Bajo
-------------- next part --------------
Index: siplib/siplib.c
===================================================================
--- siplib/siplib.c (revision 11838)
+++ siplib/siplib.c (revision 11839)
@@ -5340,7 +5340,9 @@
* ensures that there will be no more than one and that it will
* be the right one.
*/
- if (subtype != NULL && !PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)subtype))
+ // GIOVANNI: this is buggy!
+ //if (subtype != NULL && !PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)subtype))
+ if (subtype != NULL)
return subtype;
}
More information about the PyQt
mailing list