I have a widget derived from QTableView (Qt 5.5.1) for presenting data from Postgres server. I want to automatically adjust rows height to word-wrapped content when user resizes a column with mouse:
MyTableView::MyTableView(QWidget *parent) : QTableView(parent)
{
// ...
connect(
horizontalHeader(),
SIGNAL(sectionResized(int, int, int)),
this,
SLOT(resizeRowsToContents()));
}
This works perfectly for a small table, but bigger tables practically are not suitable for use because of large slowdown. I would need a signal like afterSectionResized
(when resizing is completed with mouse release) but there is no such event.
How can I avoid multiple table formatting when user resizes a column with mouse?