Results 1 to 6 of 6

Thread: Menubar in mainwindow form

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Menubar in mainwindow form

    Try this:
    Qt Code:
    1. #include <QApplication>
    2. #include <QMainWindow>
    3.  
    4. #include "ui_test.h"
    5.  
    6. int main(int argc, char *argv[]){
    7. QApplication app(argc, argv);
    8. QMainWindow *window = new QMainWindow();
    9. Ui::Test ui;
    10. ui.setupUi(window);
    11.  
    12. window->show();
    13. return app.exec();
    14. }
    To copy to clipboard, switch view to plain text mode 
    but first check whether you have set the objectName property of your form to "Test".

  2. #2
    Join Date
    Apr 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Menubar in mainwindow form

    Quote Originally Posted by jacek
    but first check whether you have set the objectName property of your form to "Test".
    It is.. as mentioned in the previous post... (albeit not very clearly.. sorry about that)

    Cheers anyway

  3. #3
    Join Date
    Apr 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Menubar in mainwindow form

    I've solved the problems.. i reinstalled qt and the menubar appeared... no idea what happened to mess it up in the first place.. and as for the second problem.. put simply i'm a moron... i'd set my environment variables badly.. they were looking in the wrong folder :P, not my brightest moment..


    Thanks for all the help anyway.

    Max

Similar Threads

  1. visible main form?
    By triperzonak in forum Newbie
    Replies: 1
    Last Post: 12th June 2008, 09:00
  2. mainwindow menubar setChecked
    By hvw59601 in forum Qt Programming
    Replies: 1
    Last Post: 31st October 2007, 18:11
  3. Replies: 1
    Last Post: 11th September 2007, 13:34
  4. What's the best way to implement a MainWindow
    By darkadept in forum Qt Programming
    Replies: 5
    Last Post: 5th February 2007, 17:46

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.