title: How to get font of widget in Qt set by stylesheet?
body: <p>I have Qt application with custom stylesheet applied to it (and for all widgets in general) with custom font included in this stylesheet. But when try to get font of some widget <code>font()</code> method return different font. I want to get the font of a <code>QWidget</code> which is set by a stylesheet. The <code>font()</code> method always returns the global system font or the font set by <code>setFont()</code>, but not the font which is set by <code>setStyleSheet()</code> and is used for painting in the widget. I need the font to do some calculations based on the font size. I use Qt 4.6. How can I get real font of widget (that is showing when application run) set by stylesheet?</p>
  
  <p>After some investigations I saw that if I apply defined stylesheet to some widget I can get proper font information (defined by stylesheet) with <code>myWidget-&gt;font()</code> method. Also when I set stylesheet to whole <code>MainWindow</code> I can get proper font information with <code>font()</code> method for all the widgets that <code>MainWindow</code> contains. But, when I set stylesheet to instance of <code>QApplication</code> the <code>font()</code> method for all the widgets return default font or the font previously set by <code>setFont()</code>. Why so?</p>