title: QML: Make property readonly in derived class
body: <p>I'm pretty sure the answer is no, but I thought I should ask anyway.  Can an inherited property be made readonly/constant in a pure QML derived class?</p>
  
  <pre><code>// Base.qml
  Item {
      property int foo: 42
  }
  
  // Derived.qml
  Base {
      foo: 99 // Make constant somehow!
  }
  </code></pre>
  
  <p>I'm currently tackling this by detecting a change in <code>foo</code> and printing an error to the console, but that's hardly a mark of good API...</p>
  
  <p>I have a menu item class which can represent menu entries, submenus, separators, etc.  I need to specialise it's behaviour, but <em>only</em> for when it is in submenu mode.  I can change the inheritance tree so I have a subclass for each menu type, but this seems silly as each subclass will only contain a single <code>readonly</code> property.  However if there isn't another way, I will have to.</p>