[SOLVED] QTableWidget SIGNAL for rowCountChanged() needed
I have a QTableWidget with two columns and zero rows at the beginning. The user can now add/remove rows dynamically by button click.
What I need now is a SIGNAL that detects when the rowCount changes, because I need to check the inputs and whether the table is empty or not..
I have two solutions which are not much pretty:
- Calling a function (SLOT for my needed SIGNAL) after the button click directly
- Starting a QTimer that checks the rowCount every time
Does anyone have a better solution?
Thank you in anticipation.
Call model() to get a pointer to underlying model and connect to rowsInserted() and rowsRemoved() signals of it.
And again, thank you very much! It works fine :-)