title: Qt QMenu setting a stylesheet
body: <p>I have a QMenu which I create like this.</p>
  
  <pre><code>QMenu *logoMenu = new QMenu();
  </code></pre>
  
  <p>I then add it to a QToolButton like so</p>
  
  <pre><code>logoButton-&gt;setMenu(logoMenu);
  </code></pre>
  
  <p>now I have an project.qss file which has the following stylesheet for the QMenu</p>
  
  <pre><code>QMenu#logoMenu {
       background-color: #161614; /* sets background of the menu */
       border: 0px solid #161614;
       width: 150px;
       position: absolute;
       top: 50px;
   }
  
   QMenu::item#logoMenu {  
       background-color: transparent;
   }
  
   QMenu::item:selected#logoMenu { 
       background-color: #202020;
   }
  </code></pre>
  
  <p>My problem is that the stylesheet does NOT get applies to the QMenu, I know I am loading the stylesheet correctly because I can style other widgets.</p>
  
  <p>If I set the stylesheet manually like so</p>
  
  <pre><code>logoMenu-&gt;setStyleSheet("QMenu {.....}");
  </code></pre>
  
  <p>Here is how I create the QMenu:</p>
  
  <pre><code>logoMenu        = new QMenu();
  logoMenu-&gt;addAction(QString::fromUtf8("Import"));
  logoMenu-&gt;addAction(QString::fromUtf8("Export"));
  logoMenu-&gt;addAction(QString::fromUtf8("Help"));
  logoMenu-&gt;addAction(QString::fromUtf8("Exit"));
  logoMenu-&gt;setObjectName("logoMenu");
  </code></pre>
  
  <p>It works, no problem. Does anyone know why this happens?</p>