I need to disable the editing and resizing of my QTableWidget while keeping the scrolling enabled. Also, the user should be able to select and copy data from the table.
First I tried this
self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
But the user is able to drag and resize the width of columns. I don't want that. So I tried this -
self.tableWidget.setDisabled(1)
Now this prevents the user from resizing the table but it also disables the scrolling and the selection of cell data.
How can I achieve both functionalites? (actually all three - no editing, no resizing, and scrolling enabled)