<br><br>I&#39;ve trying to understand how to make a cmd button call a method when the button is pressed.<br><br>I havne&#39;t been seen an example in the Signals &amp; Slots section of the QT docs which&nbsp; describe how to connect a widget signal to a callback function, only how to call a widget slot function.
<br>I don&#39;t get any runtime errors in my attempt to do this, but the callback function isn&#39;t being called.<br><br>What is the preferred method of registering a non-widget slot to be called by a widget signal?<br><br>
<br>class Dialog(QtGui.QDialog):<br>&nbsp;&nbsp;  <br>&nbsp;&nbsp;&nbsp; def __init__(self, parent=None):<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; QtGui.QDialog.__init__(self, parent)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.patchBrowser = QtGui.QTextEdit()&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # layout code omitted for brevity
<br><br>&nbsp;&nbsp;&nbsp; def updateTextBox(self): # this function shoul dbe called, when the button is pressed<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.patchBrowser.setPlainText(self.tr(&quot;Callback was called&quot;))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; def createPatchnameComboBox(self):
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.patchNames = QtGui.QComboBox()<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.patchNames.addItem(&quot;Entry 1&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.patchNames.addItem(&quot;Entry 2&quot;)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # layout code omitted for brevity<br>
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #self.connect(self.patchNames, QtCore.SIGNAL(&quot;higlighted&quot;), self, QtCore.SLOT(&quot;updateTextBox&quot;) ) # doesn&#39;t call updateTextBox<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; self.connect(self.patchNames, QtCore.SIGNAL(&quot;activated&quot;), self, 
QtCore.SLOT(&quot;updateTextBox&quot;) )<br><br><br>