Vincent
Vincent

Reputation: 60481

Qt : execute a slot each time a QTableWidget change its geometry?

I've made a widget derived from QTableWidget and I would like to execute a slot each time the a column or a line is resize, and each time the widget is resized. How to do that as there is no signal for that ?

Thank you very much.

Upvotes: 0

Views: 696

Answers (1)

pmr
pmr

Reputation: 59841

For resizing of the widget itself: Inherit from QTableView, add a signal reimplement resizeEvent. In your resizeEvent emmit your new signal and call the base implementation of resizeEvent to actually do the resizing.

For resizing of columns: Use the signals from the associated QHeaderView which you can obtain with horizontalHeader

Upvotes: 2

Related Questions