title: How to get the font file path with QFont in Qt?
body: <p>I would like to retrieve the font file path with its extension (for example "arial.ttf").</p>
  
  <p>The <em>QFont</em>::<em>rawname</em>() method always returns "<em>unknown</em>".</p>
  
  <p>Is there another way to obtain the name and the extension of a font?</p>
  
  <p>Here is the code we use:</p>
  
  <pre><code>    bool ok = true;
      QFont font = QFontDialog::getFont(&amp;ok, this);
      if(ok)
      {
      QString fontpath = "/Library/Fonts/" + font.family()+".ttf";//Using font file path in the application
      }
  </code></pre>