title: QTextEdit setting setLineWrapMode to NoWrap causes large delay
body: <p>I am using <code>QTextEdit</code> to display a Table.</p>
  <p>When I am trying to disable line wrap by using <code>setLineWrapMode(qtw.QTextEdit.NoWrap)</code>, it takes a lot of time to display the table.</p>
  <p>Is it the expected behavior? How can I reduce the delay?</p>
  <p>Minimal working example</p>
  <pre><code>import sys
  from PyQt5 import QtWidgets as qtw
  from PyQt5 import QtGui as qtg
  from PyQt5 import QtCore as qtc
  
  
  class MainWindow(qtw.QMainWindow):
  
      def __init__(self):
          super().__init__()
          
          textedit = qtw.QTextEdit()
          textedit.setReadOnly(True)
          
          textedit.setLineWrapMode(qtw.QTextEdit.NoWrap) #Commenting this line removes the delay
          
          headers = [&quot;#&quot;, &quot;Name&quot;, &quot;Address&quot;,&quot;Website&quot;]
          cursor = textedit.textCursor()
          
          
          tableFormat = qtg.QTextTableFormat()
          table=cursor.insertTable(201, 4, tableFormat)
          
          for header in headers:
              cursor.insertText(header)
              cell=table.cellAt(cursor)
              format = cell.format()
              format.setBackground(qtg.QColor(&quot;#CCE8FF&quot;))
              cell.setFormat(format)
              cursor.movePosition(qtg.QTextCursor.NextCell)
          
          for i in range(200):
              cursor.insertText(str(i+1))
              cursor.movePosition(qtg.QTextCursor.NextCell)
              cursor.insertText('David')
              cursor.movePosition(qtg.QTextCursor.NextCell)
              cursor.insertText('6th Lane, 4th street, 9th state')
              cursor.movePosition(qtg.QTextCursor.NextCell)
              cursor.insertHtml('&lt;a href=&quot;www.google.com&quot;&gt;Google&lt;/a&gt;')
              cursor.movePosition(qtg.QTextCursor.NextCell)
          
          
          self.setCentralWidget(textedit)
          self.show()
  
  
  if __name__ == '__main__':
      app = qtw.QApplication(sys.argv)
      mw = MainWindow()
      sys.exit(app.exec())
  </code></pre>