title: QScrollArea makes QTextEdit readonly
body: <p>I'm trying to add a container for showing the line numbers of a QTextEdit. From what I have seen so far I need to add a QAbstractScrollArea at the first step.</p>
  
  <p>The problem is that when I add the QAbstractScrollArea, the QTextEdit render read-only. Almost read-only, I can drag&amp;drop text but I don't have any cursor to input text.</p>
  
  <p>Any ideeas?
  Thanks!</p>
  
  <pre><code>mainWindow = QMainWindow()
  textEdit = QTextEdit(mainWindow)
  textDocument = QTextDocument(textEdit)
  ...
  # adding some text do textEdit
  ...
  
  scrollArea = QAbstractScrollArea()
  scrollArea.setViewport(textEdit)
  scrollArea.setViewportMargins(20, 0, 0, 0)
  mainWindow.setCentralWidget(scrollArea)
  mainWindow.show()
  </code></pre>