PDA

View Full Version : error for drawing a line on mainwindow.



sujan.dasmahapatra
6th February 2009, 07:03
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::DisplayMainWindow(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*)

spirit
6th February 2009, 07:15
try this in ctor


...
ui.setupUi(this);
...