title: Invisible text in QTextEdit
body: <p>I am learning Qt and running examples from Qt SDK 5.9.1. I run the code below and write inside QTextEdit but no text appears. Cursor moves as I write but no text is shown. Window title text is shown. I added <code>addApplicationFont</code> and <code>setFont</code> calls below I found from web to the sample but it didn't help.</p>
  
  <pre><code>#include &lt;QtWidgets&gt;
  
  int main(int argc, char *argv[])
  {
      QApplication app(argc, argv);
  
      QFontDatabase::addApplicationFont("://Ubuntu-R.ttf");
      app.setFont(QFont("Ubuntu", 11, QFont::Normal, false));
  
      QTextEdit textEdit;
      textEdit.show();
  
      return app.exec();
  }
  </code></pre>
  
  <p>I am on Ubuntu 16.04 and run following commands on bash to make executable:</p>
  
  <pre><code>qmake -makefile
  make
  ./part1
  </code></pre>
  
  <p>I want the app to use the default Ubuntu system font. I learned that Qt uses fontconfig for fonts but I don't know how to trace the issue.</p>
  
  <p><strong>Edit</strong> </p>
  
  <p>I thought <code>QFontDatabase::addApplicationFont("://Ubuntu-R.ttf")</code> call referenced system font but instead it is referencing font app resource file. I don't have resource file so obviously it won't work.</p>
  
  <p>.pro file is below(unmodified sample file):</p>
  
  <pre><code>QT += widgets
  SOURCES = main.cpp
  
  # install
  target.path = $$[QT_INSTALL_EXAMPLES]/widgets/tutorials/gettingStarted/gsQt/part1
  INSTALLS += target
  </code></pre>
  
  <p>I tried to get system font using QFontDatabase but it didn't work:</p>
  
  <pre><code>app.setFont(QFontDatabase::systemFont(QFontDatabase::GeneralFont));
  </code></pre>
  
  <p>This doesn't do anything with any of enum values including <code>QFontDatabase::GeneralFont</code></p>
  
  <pre><code>QFontDatabase database;
  QStringList fam = database.families();
  </code></pre>
  
  <p><code>fam</code> size is zero.</p>
  
  <p>I will try to use embedded font next.</p>