Why doesn't the content of the edit box get transferred into the lcdNumber field?
class MainDialog (QDialog, MultiTool_widget_ui.Ui_Form):
def __init__(self):
#super(MainDialog, self).__init__() OR <next line>
QDialog.__init__(self)
self.setupUi(self)
self.connect(self.pushButton, SIGNAL("clicked()"),self.lcdNumber.display(self.lineEdit.text()))
Signals must be connected to a callable object. But in your example:
you are actually passing in the return value of the
display()
method, which in this case, isNone
.To fix your example, you can use a
lambda
function, like this:Now you are passing in a function object, which will be called when the signal is fired.