[Qt-interest] mainWindow does't show menuBar

yanqzhi at gmail.com yanqzhi at gmail.com
Thu Dec 10 08:17:25 CET 2009


hello,

The source code is bellow:

int main(int argc, char *argv[])
{
 QApplication a(argc, argv);
 QMainWindow *win = new QMainWindow();
 QMenuBar *menuBar;
 QToolBar *mainToolBar;
 menuBar = new QMenuBar(win);
 mainToolBar = new QToolBar(win);
  win->setMenuBar(menuBar);
 win->addToolBar(mainToolBar);
 win->show();
 return a.exec();
}

 
When I run the appliacation, the mainWindow only shows the toolbar,but does't show menubar.

Thanks a lot.

         
        yanqzhi at gmail.com 
          2009-12-10 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091210/2ffc915c/attachment.html 


More information about the Qt-interest-old mailing list