title: Qt Designer custom plugin and dynamic properties
body: <p>I am trying to write some set of custom widget as Qt Designer plugin. Some of the properties are same for all my widgets, so I want to make a base class. But there is a problem with multiple inheritnece, when base class inherits from QObject (because of Q_PROPERTY macro to make its properties editable in Qt Designer) and the custom widget needs to be child of QWidget. But I found Qt's dynamic property so base class gets the widget pointer and sets the dynamic property. </p>
  
  <pre><code>class BaseClass {
    QWidget *widget;
    BaseClass(QWidget *widget) {
      this-&gt;widget = widget;
      this-&gt;widget-&gt;setProperty("Some", 0.0);
    }
    void setSome(double some) {
      this-&gt;widget-&gt;setProperty("Some", some);
    }
  ...
  </code></pre>
  
  <p>Thats ok. I can set the dynamic property and see them and edit them in Qt Designer, all is ok. BUT when I want to read from the property something is wrong. When I am using:</p>
  
  <pre><code>this-&gt;widget-&gt;property("Some").value&lt;double&gt;();
  </code></pre>
  
  <p>Qt Designer doesn't start (?!).</p>
  
  <p>And when I use this more then once</p>
  
  <pre><code>QVariant var = this-&gt;widget-&gt;property("Some");
  return var.toDouble();
  </code></pre>
  
  <p>It's the same problem! Qt Designer fails to start with no message or other hint. I am using Qt 4.7.4 with its designer. The same proble is in Qt Creators designer (tested on 2.0.0, 2.0.1).</p>
  
  <p>Am I wrong or it is Qt's issue?</p>
  
  <p>Thanks for any suggestions!</p>