In my application there are 3 tables. I update them in callback from QProcess with listing from the external program – after calling rowCount(0), i.e. after first clearing the tables. First two tables have vertical QScrollBar::maximum() automatically updated so that I know what is the QScrollBar's maximum setValue() argument. However, not knowing why, third table has maximum() stuck at 0. What can be the cause? The code is the same for the 3 tables, and in general, maximum() should be updated as I call insertRow(), this should be an independent action. Why it isn't updated in the single table?

Currently I solve this by calling setMaximum() before setValue() – I set the maximum to a large number, two times larger than number of rows in QTableWidget.