[SOLVED] QTableWidget SIGNAL for rowCountChanged() needed
General and Desktop
3
Posts
2
Posters
2.1k
Views
1
Watching
-
Hi,
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.
-
J JonB referenced this topic on