0

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.

Vincent
  • 57,703
  • 61
  • 205
  • 388

1 Answers1

2

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

pmr
  • 58,701
  • 10
  • 113
  • 156