I have a QTableView in my programm which I want to resize automatically. I used the functions
headerViewHorizontal->setSectionResizeMode(QHeaderView::ResizeToContents);
headerViewHorizontal->setSectionResizeMode(3, QHeaderView::Stretch);
to resize it and it works for when I resize the window. But then I need to insert a row in the table which could need to resize the columns. My problem is here. When I insert a row, one of the fields it too larg and the system write it with tree dots (ex. : "12.03..." instead of "12.03.2020"). I need to resize my window to make the system resize the columns.
Is there a slot which I can call to force an update of the columns width ?
Thank you in advance !
PS I'm using Qt5 with c++.