title: QML How to dynamically chage the Color of a TextArea?
body: <p>Here is the code for my test APP:</p>
  
  <pre><code>TextAreaStyle{
      id: loggerStyle
      textColor: "#00ff88";
      backgroundColor: "#000000";
  }
  
  TextArea {
      id: taLog
      readOnly: true
      width: parent.width
      height: parent.height - labelTitle.height - btnTest.height - 2*v_AIR
      x: 0
      y: labelTitle.height + v_AIR
      style: loggerStyle
      font.family: "Helvetica";
      font.pointSize: 16;
      font.bold: true
      function logError(msg){
          loggerStyle.textColor = "#FF0000"
          taLog.text = taLog.text + "\n" + msg
      }
      function logMessage(msg){
          loggerStyle.textColor = "#FFFFFF"
          taLog.text = taLog.text + "\n" + msg
      }
      function logSuccess(msg){
          loggerStyle.textColor = "#00FF00"
          taLog.text = taLog.text + "\n" + msg
      }
  }
  </code></pre>
  
  <p>When I try to run this code I get all of these messages:</p>
  
  <pre><code>file:///opt/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/Private/Style.qml:52: ReferenceError: __control is not defined
  file:///opt/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/Styles/Base/ScrollViewStyle.qml:56: ReferenceError: __control is not defined
  file:///opt/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/Styles/Base/TextAreaStyle.qml:80: TypeError: Cannot read property 'enabled' of null
  file:///opt/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/Styles/Base/TextAreaStyle.qml:77: TypeError: Cannot read property 'enabled' of null
  file:///opt/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/Styles/Base/TextAreaStyle.qml:68: ReferenceError: __control is not defined
  file:///opt/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/ScrollView.qml:354: TypeError: Cannot read property 'padding' of null
  file:///opt/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/ScrollView.qml:353: TypeError: Cannot read property 'padding' of null
  file:///opt/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/ScrollView.qml:352: TypeError: Cannot read property 'padding' of null
  file:///opt/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/ScrollView.qml:351: TypeError: Cannot read property 'padding' of null
  file:///opt/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/TextArea.qml:906: TypeError: Cannot read property '__selectionHandle' of null
  file:///opt/Qt5.7.0/5.7/gcc_64/qml/QtQuick/Controls/TextArea.qml:942: TypeError: Cannot read property '__cursorHandle' of null
  </code></pre>
  
  <p>And no style is applied to my text area.</p>
  
  <p>So what is the correct way to dynamically change the color that I use to write messages to a TextArea? </p>