[Eric] Basic button question - correction

Phil phil_lor at bigpond.com
Mon Feb 18 05:36:50 GMT 2013


I've made a correction to my earlier code but even so the button signal 
doesn't connect to it's slot.

         self.retranslateUi(MainWindow)
         QtCore.QObject.connect(self.pushButton, 		 
QtCore.SIGNAL(_fromUtf8("toggled(bool)")), MainWindow.on_pushButton_toggled)
         QtCore.QMetaObject.connectSlotsByName(MainWindow)


I'm not sure if the Designer signal above matches the slot code 
generated by Eric.

     @pyqtSignature("bool")
     def on_pushButton_toggled(self, checked):
         """
         Slot documentation goes here.
         """
         # TODO: not implemented yet
         #raise NotImplementedError
         self.label.setText("text")

-- 
Regards,
Phil


More information about the Eric mailing list