[Eric] PyQt-Slot for QtWidget (QComboBox) created during runtime
    GM 
    mossl at gmx.net
       
    Sun Sep 23 13:39:06 BST 2018
    
    
  
Hi @all,
I've created a dialog-window with an QTableWidget. Users can add a row 
by using a pushbutton. In a cell of the new row appears a QComboBox. How 
can changes of this QComboBox trigger a function?
It's no problem for to text-only-cells (I can use:
     @pyqtSlot(int, int)
     def on_tableWidgetX_cellChanged(self, row, column):
         print("cell changed: ", row, column)
which works as intended.)
Functions like
     @pyqtSlot(QComboBox)
     def on_tableWidgetX_itemChanged(self, item):
         print("OK1")
     @pyqtSlot(QComboBox)
     def on_tableWidgetX_itemClicked(self, item):
         print("Ok2")
never recieve a signal.
I think the QComboBox can not send a aignal. Originally the "Generate 
Dialog Code..."-dialog suggests to pass a "QTableWidgetItem*" to the 
pyqtSlot, but this Item is created during runtime, so it can not be 
found in the Ui_Dialog...
Any suggestions?
george
    
    
More information about the Eric
mailing list