title: Disable editing of QTableWidget in PyQt5 (with scrolling enabled)
body: <p>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.</p>
  <p>First I tried this</p>
  <pre><code>self.tableWidget.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
  </code></pre>
  <p>But the user is able to drag and resize the width of columns. I don't want that. So I tried this -</p>
  <pre><code>self.tableWidget.setDisabled(1)
  </code></pre>
  <p>Now this prevents the user from resizing the table but it also disables the scrolling and the selection of cell data.</p>
  <p>How can I achieve both functionalites? (actually all three - no editing, no resizing, and scrolling enabled)</p>