title: Qt/C++ - Barcodes generated not readable
body: <p>I have written a simple barcode generator in Qt5/C++ (Windows):</p>
  
  <pre><code>void BarcodeDialog::printBarcode(QString barcodeText)
  {
      int id = QFontDatabase::addApplicationFont(":/fonts/code128.ttf");
      QFontDatabase::applicationFontFamilies(id).at(0);
      QFont barcodefont = QFont("Code 128", 50, QFont::Normal);
      barcodefont.setLetterSpacing(QFont::AbsoluteSpacing,0.0);
      this-&gt;ui-&gt;label-&gt;setFont(barcodefont);
      this-&gt;ui-&gt;label-&gt;setText(barcodeText);
  }
  </code></pre>
  
  <p>It generates the barcode, but the barcode scanner app on my android phone fails to read the generated barcode. What I am doing wrong in this case?</p>
  
  <p><a href="https://i.stack.imgur.com/R8eM4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R8eM4.png" alt="enter image description here"></a></p>
  
  <p><strong>Edit:</strong>
  The plain text needs some encoding. Refer to <a href="https://github.com/adamgiacomelli/Qt-barcode" rel="nofollow noreferrer">https://github.com/adamgiacomelli/Qt-barcode</a> for code sample</p>