title: Adding a QLabel to a QWidget
body: <p>I am new to Qt and C++ and working on an application and I am trying to add <code>QLabel</code> in a <code>QWidget</code>, using <code>QHBoxLayout</code>.
  I am setting the text of label to something but it is not visible in the Label.</p>
  
  <p>Here is the piece of the code:</p>
  
  <pre><code>setStyleSheet( "QWidget{ background-color : rgba( 160, 160, 160, 255); border-radius : 7px;  }" );
  QLabel *label = new QLabel(this);
  QHBoxLayout *layout = new QHBoxLayout();
  label-&gt;setText("Random String");
  layout-&gt;addWidget(label);
  setLayout(layout);    
  </code></pre>
  
  <p>The styleSheet is for the Widget in which QLabel is added.</p>
  
  <p>The string <code>"Random String"</code> doesn't get displayed inside the label. </p>
  
  <p>Please help.</p>