Unsolved Qt4 to qt5
-
Could someone please spare a minute to translate this to Qt5 to help me understand what I need to do to get an old qt4 program to run.
"self.connect(self.drawWidget, SIGNAL('update_color'), self.colorPush.setStyleSheet)"Translation script gives me
"self.drawWidget.update_color.connect(self.colorPush.setStyleSheet)"But "AttributeError: 'GUIDraw' object has no attribute 'update_color'"
-
The script is wrong, the old statement is correct
-
Thanks I'll reload originals and start again.
-
Back where I started
self.connect(self.drawWidget, SIGNAL('update_color'), self.colorPush.setStyleSheet)
AttributeError: 'GUIDesign' object has no attribute 'connect'
Which takes me back again to
"Using QObject.connect() and similar in PyQt4 is known as "Old style signals", and is not supported in PyQt5 anymore, it supports only "New style signals"," -
self.drawWidget.update_color.connect(self.colorPush.setStyleSheet)
-
Hi,
Can you show the implementation of your DrawWidget class ?