<div dir="ltr"><div dir="ltr"><div>Dear George,</div><div><br></div><div>I think that you should create a slot for the specific QComboBox object and not for the cell of the QTableWidget object.</div><div>For example, for a QComboBox created in the <span style="font-family:monospace,monospace">Ui_MainWindow.setupUI()</span>, the corresponding slot created in the <span style="font-family:monospace,monospace">MainWindow.setupUI()</span> should have the following form, for integer or string type index.</div><div><br></div><div><span style="font-family:monospace,monospace"> @pyqtSlot(int)<br> def on_spk_ver_rep_QComboBox_currentIndexChanged(self, index):<br> """<br> Slot documentation goes here.<br> <br> @param index DESCRIPTION<br> @type int<br> """<br> # TODO: not implemented yet<br> raise NotImplementedError<br> <br> @pyqtSlot(str)<br> def on_spk_ver_rep_QComboBox_currentIndexChanged(self, p0):<br> """<br> Slot documentation goes here.<br> <br> @param p0 DESCRIPTION<br> @type str<br> """<br> # TODO: not implemented yet<br> raise NotImplementedError<br></span></div></div><div dir="ltr"><br></div><div>Christos<br></div><div><br></div><div><br></div><div><br></div><div class="gmail_quote"><div dir="ltr">On Sun, 23 Sep 2018 at 15:40, GM <<a href="mailto:mossl@gmx.net">mossl@gmx.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi @all,<br>
<br>
I've created a dialog-window with an QTableWidget. Users can add a row <br>
by using a pushbutton. In a cell of the new row appears a QComboBox. How <br>
can changes of this QComboBox trigger a function?<br>
<br>
It's no problem for to text-only-cells (I can use:<br>
<br>
@pyqtSlot(int, int)<br>
def on_tableWidgetX_cellChanged(self, row, column):<br>
print("cell changed: ", row, column)<br>
<br>
which works as intended.)<br>
<br>
Functions like<br>
<br>
@pyqtSlot(QComboBox)<br>
def on_tableWidgetX_itemChanged(self, item):<br>
print("OK1")<br>
<br>
@pyqtSlot(QComboBox)<br>
def on_tableWidgetX_itemClicked(self, item):<br>
print("Ok2")<br>
<br>
never recieve a signal.<br>
<br>
I think the QComboBox can not send a aignal. Originally the "Generate <br>
Dialog Code..."-dialog suggests to pass a "QTableWidgetItem*" to the <br>
pyqtSlot, but this Item is created during runtime, so it can not be <br>
found in the Ui_Dialog...<br>
<br>
Any suggestions?<br>
<br>
<br>
george<br>
<br>
_______________________________________________<br>
Eric mailing list<br>
<a href="mailto:Eric@riverbankcomputing.com" target="_blank">Eric@riverbankcomputing.com</a><br>
<a href="https://www.riverbankcomputing.com/mailman/listinfo/eric" rel="noreferrer" target="_blank">https://www.riverbankcomputing.com/mailman/listinfo/eric</a><br>
</blockquote></div></div>