Hello,<br><br>Here's a stripped down example of my problem.<br>I have a group of widgets that I keep together with a class called MyWidgetGroup.<br>It holds a line edit and a label which together have a meaning (getMeaning) but by themselves mean nothing.<br>
<br>I need to make connections to a method so it'll get called whenever the widget's text changes but I don't want the reference to the line edit, I want the reference to the widget group (so I can getMeaning on it).<br>
<br>To do this I wound up creating a dummy method that just propagates the signal so that it comes from the widget group instead of just the line edit.<br>I have a bad feeling about this. There must be a better way to do this right?<br>
Can this be accomplished by connecting signals to signals?<br><br>class MyWidgetGroup(QWidget):<br> <br> def __init__(self, parent=None):<br> super(MyWidgetGroup, self).__init__(parent)<br> <br> self.myLabel = MyLabel(self)<br>
self.myEdit = MyLineEdit(self)<br> <br> self.connect(self.myEdit, SIGNAL("textChanged(QString)"), self.pointless)<br> <br> def pointless(self, qstring):<br> self.emit(SIGNAL("theValueChanged"))<br>
<br> def getMeaning(self):<br> return self.myLabel.text() + '-' + self.myEdit.text()<br><br>