title: Qt5: How to hide or remove a QMenu from the QMenuBar?
body: <p>I am using Qt5 on Windows7 platform:<br>
  Qt Creator version is: v3.3.2.<br>
  Qt version 5.5.1 and MinGW 32bit.   </p>
  
  <p>Currently, in the menu bar I have:   </p>
  
  <blockquote>
    <p>Configuration - Reports - Help</p>
  </blockquote>
  
  <p>I searched SO and I found this as a possible answer: <a href="https://stackoverflow.com/q/32375691/4731718">Not possible to hide a QMenu object QMenu::setVisible()?</a>,   but <strong>it didn't work</strong>...</p>
  
  <p>So, I was trying to remove the Help menu using:      </p>
  
  <pre><code>ui-&gt;menuHelp-&gt;setVisible(false);
  </code></pre>
  
  <p>and:   </p>
  
  <pre><code>ui-&gt;menuHelp-&gt;menuAction()-&gt;setVisible(false);
  </code></pre>
  
  <p>Unfortunatelly, both failed to hide/remove the <code>Help</code> menu...    </p>
  
  <p>Please, is there any other way to do it?   </p>
  
  <p><strong>[Code]:</strong>    </p>
  
  <pre><code>MainWindow::MainWindow(QWidget * parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
      this-&gt;setWindowFlags(this-&gt;windowFlags() &amp; ~Qt::WindowMaximizeButtonHint);
      if(!server.listen(QHostAddress("192.168.1.2"), 8001))
          return;
      if(true) // just testing...
         ui-&gt;menuHelp-&gt;menuAction()-&gt;setVisible(false);
  }
  </code></pre>