Results 1 to 2 of 2

Thread: error for drawing a line on mainwindow.

  1. #1
    Join Date
    Feb 2009
    Posts
    189
    Thanks
    2

    Default error for drawing a line on mainwindow.

    Dear Friends
    I have a UI header file and from there I have created another header file where in the class I have declared a private member as Ui::MainWindow ui;
    Now in my .cpp file I am trying to call the UI header’s steupUi(this) function and it gives the following error on compilation..Please let me know the reseaon..Thanks

    LMG_GUI_Design_CFD.cpp: In constructor `DisplayMainWindow:isplayMainWindow(QWidget*)':
    LMG_GUI_Design_CFD.cpp:5: error: no matching function for call to `Ui::MainWindow::setupUi(DisplayMainWindow* const)'
    ui_LMG_GUI_Design_CFD.h:85: note: candidates are: void Ui_MainWindow::setupUi(QMainWindow*)

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: error for drawing a line on mainwindow.

    try this in ctor
    Qt Code:
    1. ...
    2. ui.setupUi(this);
    3. ...
    To copy to clipboard, switch view to plain text mode 
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

Similar Threads

  1. QTcpSocket exception.
    By Fastman in forum Qt Programming
    Replies: 9
    Last Post: 29th January 2008, 13:51
  2. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  3. Qwizard crashed when created in a slot
    By joshlareau in forum Qt Programming
    Replies: 9
    Last Post: 15th January 2008, 09:16
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  5. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18:42

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.