I created a QTableWidget
whith two columns in Qt Creator.
I already found out how to set the width of a column with the setColumnWidth()
function. But in my GUI the user can still change the width of columns. How can I set the width to a fixed size and forbid the user to modify it?
Use
table.horizontalHeader().setSectionResizeMode(...)
(orsetResizeMode
in older Qt versions) with appropriate resize mode.