PeterMW88
15th April 2014, 00:31
I'm using a spinbox to set the number of rows and columns in some QTableWidgets. I did what is described in this thread: http://www.qtcentre.org/threads/25736-Can-I-use-a-spinBox-to-control-the-number-of-rows-in-a-QTableWidget
However, I have multiple tables. Can I make a slot which will work for all the tables? The slot function needs access to the specific table it is changing, so I thought about passing a pointer, but the slot needs to have only one parameter, int, in order to work with the signal from the spinbox. So can I "register" my custom slot with the QTableWidget class somehow, so I have access to the table methods in the slot function?
Thanks in advance.
Edit: Maybe I should create a customized version (subclass) of QTableWidget?
However, I have multiple tables. Can I make a slot which will work for all the tables? The slot function needs access to the specific table it is changing, so I thought about passing a pointer, but the slot needs to have only one parameter, int, in order to work with the signal from the spinbox. So can I "register" my custom slot with the QTableWidget class somehow, so I have access to the table methods in the slot function?
Thanks in advance.
Edit: Maybe I should create a customized version (subclass) of QTableWidget?