Trying to understand signals and slots.
Have looked at many examples, but can not find how to incorporate them into my working program.
The following code is meant to take a changed value from a combo box, and enter it in an LCD.
The program runs without error, but the LCD is not activated.
What do I have to change to get it to work?

Thanks,
Don

Qt Code:
  1. def createTopRightGroupBox(self):
  2. self.topRightGroupBox = QtGui.QGroupBox("Top Right")
  3.  
  4. labelVolts = QtGui.QLabel("Volts/Div")
  5. labelVolts.setAlignment(QtCore.Qt.AlignHCenter)
  6.  
  7. comboVolts = QtGui.QComboBox()
  8. volts = ['2.5', '5.0', '10.0', '20.0']
  9. comboVolts.addItems(volts)
  10.  
  11. lcdVolts = QtGui.QLCDNumber()
  12.  
  13. layout = QtGui.QVBoxLayout()
  14. layout.addWidget(labelVolts)
  15. layout.addWidget(comboVolts)
  16. layout.addWidget(lcdVolts)
  17. layout.addStretch(1)
  18. self.topRightGroupBox.setLayout(layout)
  19.  
  20. # process signal
  21. self.connect(comboVolts, QtCore.SIGNAL('valueChanged'), self.changeValue)
  22.  
  23. def changeValue(self, event):
  24. volts = self.comboVolts.value()
  25. self.lcdVolts.display(volts)
To copy to clipboard, switch view to plain text mode