QMenuBar didn't show up on Windows Mobile 6



  • I'm using a WM Emulator.
    The code worked perfectly on Window Desktop, but I missed menu bar of main window when I ported it to WM.

    Here's my menu creation process,
    @
    void MyMainWindow::createMenus()
    {
    fileMenu = menuBar()->addMenu(tr("&File"));
    fileMenu->addAction(openFileAct);
    fileMenu->addAction(openUriAct);

    fileMenu->addSeparator();
    fileMenu->addAction(exitAct);
    
    menuBar()->addSeparator();
    
    helpMenu = menuBar()->addMenu(tr("&Help"));
    helpMenu->addAction(aboutAct);
    

    }
    @

    I knew there's subtle difference for QMenuBar between CE and Desktop,
    [quote]
    QMenuBar on Windows CE is a wrapper for using the system-wide menu bar, similar to the Mac. This feature is activated for Windows Mobile and integrates QMenuBar with the native soft keys. The left soft key can be controlled with QMenuBar::setDefaultAction() and the right soft key can be used to access the menu bar.
    [/quote]

    I really suspected it's sth to do with my project configuration, since I neither created project from Qt Add-in wizard nor Qt Creator.
    I created a common CE project, and manually set up Qt-related stuff. Now looked like it can ran on emulator, showed sth, except the menubar's lost.

    Any suggestion?



  • Now I confirmed it had to be sth to do with project configuration. I just tested same code both on my own project and on a Qt CE application project which was created from Qt Add-in wizard, the latter worked well whereas mine failed again.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.