I recently moved from pyside
to pyqt5
and there is a problem. I looked it up online and apparently, it already happened to people who used pyqt4
and moved to pyqt5
. However, it didn't really help... I tried to add pyqtSignal
after Qobject
but it is still not working. Please help.
these are my code lines:
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"),Dialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), Dialog.reject)
and this is what appears when I run it:
AttributeError: type object 'QObject' has no attribute 'connect'
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…