title: Include leading whitespaces in QML TextEdit
body: <p>I am using a QML TextArea as a text input. It seems like this TextArea automatically removes leading and trailing whitespaces. If I start the text with a couple of spaces, the cursor doesn't move. If I then type a normal character, the cursor jumps the amount of spaces typed before.</p>
  
  <p>I managed to include trailing whitespaces by changing the TextOptions of the underlying QQuickTextDocument on the C++-side, but couldn't find a way to show leading whitespaces.</p>
  
  <p>Is there a way to do that?</p>
  
  <p>EDIT: It's really just a (very slightly styled) TextArea</p>
  
  <pre><code>T.TextArea {
      id: control
  
      padding: 6
  
      opacity: enabled ? 1 : 0.8
      font.pixelSize: TextStyle.font.size.regular
      color: Color.gray_09
      selectionColor: Color.cyan_066
      selectedTextColor: color
      wrapMode: TextEdit.Wrap
  
      InputFieldPlaceholderText {
          anchors.top:  parent.top
          anchors.left: parent.left
          anchors.topMargin: parent.topPadding
          anchors.leftMargin: parent.leftPadding
  
          textBox: control
      }
  
      TextEditFormatter {
          id: textAreaFormatter
          Component.onCompleted: onCompleted()
      }
  }
  </code></pre>
  
  <p>Which I call like this:</p>
  
  <pre><code>Flickable { 
      anchors.fill: parent
      flickableDirection: Flickable.VerticalFlick
      TextArea {
          id: textArea
          anchors.fill: parent
      }
  }
  </code></pre>
  
  <p>For Completion: This is what the TextEditFormatter does, but not using it doesn't change the behaviour...:</p>
  
  <pre><code>void TextEditFormatter::onCompleted()
  {
      auto document = parent()
                      -&gt;property("textDocument")
                      .value&lt;QQuickTextDocument *&gt;()
                      -&gt;textDocument();
      auto textOptions = document-&gt;defaultTextOption();
  
      textOptions.setFlags(QTextOption::IncludeTrailingSpaces);
      document-&gt;setDefaultTextOption(textOptions);
  }
  </code></pre>