Results 1 to 20 of 105

Thread: Problem displaying my main window

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Problem displaying my main window

    Hi. I've got a question. I have created my main window using designer and translated it into Qt code. So after translations I received a ui_Maker.h file:

    http://www.insidetennis.yoyo.pl/ntd.txt

    And how can I display this main window (called MainWindow) ?
    I tried this in main.cpp:
    Qt Code:
    1. #include "ui_Maker.h"
    2.  
    3. int main(int argc, char *argv[])
    4. {
    5. QApplication app(argc, argv);
    6. MainWindow->show();
    7. return app.exec();
    8. }
    To copy to clipboard, switch view to plain text mode 
    but there appear error that MainWindow is undeclared. What did I do wrong? And how can I correct it? Btw. my test.pro file:
    Qt Code:
    1. CONFIG += qt
    2. HEADERS += ui_Maker.h
    3. SOURCES += main.cpp
    To copy to clipboard, switch view to plain text mode 

    Regards
    Last edited by wysota; 12th May 2007 at 21:20. Reason: Changed [qtclass] to [code]

Similar Threads

  1. Replies: 15
    Last Post: 23rd March 2007, 16:16
  2. move parent window to the front.
    By hvengel in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2007, 08:41
  3. Problem in porting Main window on linux
    By jyoti kumar in forum Qt Tools
    Replies: 2
    Last Post: 2nd June 2006, 08:35
  4. cannot make a main window modal
    By Dark_Tower in forum Qt Programming
    Replies: 12
    Last Post: 23rd March 2006, 10:21
  5. Main window
    By Michiel in forum Qt Tools
    Replies: 1
    Last Post: 20th March 2006, 23:54

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.