Qt : Fit width of TableView to width of content
问题 I have a window that contains a QTableView which columns are adjusted to content and are fixed in width . The QTableView is nested within a QWidget that in turn is nested within a QScrollArea that in turn is nested within a tabbed QMdiArea which is the centralWidget of a QMainWindow . When the QScrollArea is shown, the QTableView has extra space to the right of the last column that I want to be removed : I want the QTableView to fit the exact width of the columns (i.e. no extra space after