Re: [PyQt] sip.pyd crash due to class order of inheritance
Phil Thompson-5 wrote: > > On Sun, 27 Dec 2009 12:12:09 -0800 (PST), Demetrius Cassidy > wrote: >> import sys >> from PyQt4 import QtCore, QtGui >> >> app = QtGui.QApplication(sys.argv) >> >> class Ui_Frame(object): >> def setupUi(self, Frame): >> Frame.setObjectName("Frame") >> Frame.resize(200, 300) >> Frame.setMinimumSize(QtCore.QSize(200, 200)) >> >> class FrameWnd(Ui_Frame, QtGui.QFrame): >> >> def __init__(self): >> QtGui.QFrame.__init__(self) >> self.setupUi(self) >> >> frm = FrameWnd() >> frm.show() >> sys.exit(app.exec_()) >> >> If you inherit from Ui_Frame before QFrame, you get a crash in sip.pyd. > But >> if you swap the order around it works fine. This is using Sip 4.10 > 12/23 >> snapshot along with PyQt 4.7 12/23 snapshot > > Already fixed in the current SIP snapshot (I think). > > Phil > ___ > PyQt mailing listPyQt@riverbankcomputing.com > http://www.riverbankcomputing.com/mailman/listinfo/pyqt > > Yes the latest snapshot seems to fix it - thanks. -- View this message in context: http://old.nabble.com/sip.pyd-crash-due-to-class-order-of-inheritance-tp26936416p26938128.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
Re: [PyQt] sip.pyd crash due to class order of inheritance
On Sun, 27 Dec 2009 12:12:09 -0800 (PST), Demetrius Cassidy wrote: > import sys > from PyQt4 import QtCore, QtGui > > app = QtGui.QApplication(sys.argv) > > class Ui_Frame(object): > def setupUi(self, Frame): > Frame.setObjectName("Frame") > Frame.resize(200, 300) > Frame.setMinimumSize(QtCore.QSize(200, 200)) > > class FrameWnd(Ui_Frame, QtGui.QFrame): > > def __init__(self): > QtGui.QFrame.__init__(self) > self.setupUi(self) > > frm = FrameWnd() > frm.show() > sys.exit(app.exec_()) > > If you inherit from Ui_Frame before QFrame, you get a crash in sip.pyd. But > if you swap the order around it works fine. This is using Sip 4.10 12/23 > snapshot along with PyQt 4.7 12/23 snapshot Already fixed in the current SIP snapshot (I think). Phil ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] sip.pyd crash due to class order of inheritance
import sys from PyQt4 import QtCore, QtGui app = QtGui.QApplication(sys.argv) class Ui_Frame(object): def setupUi(self, Frame): Frame.setObjectName("Frame") Frame.resize(200, 300) Frame.setMinimumSize(QtCore.QSize(200, 200)) class FrameWnd(Ui_Frame, QtGui.QFrame): def __init__(self): QtGui.QFrame.__init__(self) self.setupUi(self) frm = FrameWnd() frm.show() sys.exit(app.exec_()) If you inherit from Ui_Frame before QFrame, you get a crash in sip.pyd. But if you swap the order around it works fine. This is using Sip 4.10 12/23 snapshot along with PyQt 4.7 12/23 snapshot -- View this message in context: http://old.nabble.com/sip.pyd-crash-due-to-class-order-of-inheritance-tp26936416p26936416.html Sent from the PyQt mailing list archive at Nabble.com. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt