title: How to programmatically set the disabled state color for a qt control?
body: <p>In the load event of my window, I am accessing the <code>rootObject()</code> (which is a <code>QQuickItem</code>) and using that to get a reference to controls defined in my QML file. I am then using this code to programmatically set/change the control's color:</p>
  
  <pre><code>object-&gt;setProperty("color", "#3060C0");
  </code></pre>
  
  <p>This works and does change the control to the color I want. However, if the control is disabled and then re-enabled at run time, it then shows the default color (black) instead of the color <code>#3060C0</code>. If I set the <code>color:</code> property in the QML file, it "sticks" and retains this color even after being disabled and re-enabled, but I need to be able to change this color programmatically.</p>
  
  <p>Is there some way to programmatically set the disabled-state color in addition to the regular "color" property like I'm doing? Or some way to disable the color change with the enabled property change entirely?</p>