Important: Please read the Qt Code of Conduct -

Open New Window using Javascript and Menu bar hide issue

  • Hi,

    I Have modified the Demo browser code to hide the Menu bar i.e. File/Edit etc menus.
    but after hiding the menu bar, even the keyboard short keys doesn't work.
    For an example if I press Ctrl+N for opening new window with menu bar hidden, nothing happens.
    Below are the changes done:
    added line : menuBar()->setVisible(false);
    at the end of the function "void BrowserMainWindow::setupMenu()" from browsermainwindow.cpp.

    Please help how to achieve opening new window with short keys while menu bar is hidden.

    Also if i do open new window with javascript the new window is opened without menu bar even the menu bar is not hided. And the window is displayed without opacity which is coded in the mainwindow function.

    Any help will be grateful.

    Thanks in advance


  • Which Qt version and which system are you using?
    Also, there are several browser examples, please tell us the directory name, just to be sure.

  • I am using Qt 4.8 on fedora17 system.
    The project location is /QtSdk/Demos/4.7/browser.

    The project is available with the latest sdk setup.

Log in to reply