title: Specifying font for many Text-elements in Qt QML
body: <p>I have a widget specified through a QML file. This widget contains a top level<code>Rectangle</code> which contains two <code>Columns</code>. Each of these <code>Columns</code> contains many <code>Text</code>-elements. This QML widget is wrapped in a subclass of <code>QDeclarativeView</code> in C++.</p>
  
  <p>I want to specify the font for each of these <code>Text</code>-elements. Today I do this by specifying top-level properties:</p>
  
  <pre><code>property string fontfamily: "Arial"
  property bool fontbold: false
  property bool fontitalic: false
  property int fontpixelsize: 11
  property string fontcolor: "White"
  </code></pre>
  
  <p>and bind each <code>Text</code>-elements to these properties:</p>
  
  <pre><code>Text
  {   
      color: fontcolor
      font.family: fontfamily
      font.bold: fontbold
      font.italic: fontitalic
      font.pixelSize: fontpixelsize
      ...
  }
  </code></pre>
  
  <p>This isn't very elegant and new fields needs to be added every time I need support for something new (e.g. underlined fonts). I have not been able to declare a property of type <code>font</code> and bind to this instead (widget is blank and qmlviewer warns about "expected type after property").</p>
  
  <p>Is there a better way to specify a font for all <code>Text</code>-elements?</p>
  
  <p>Note! I'm handwriting the QML files.</p>