[Qt-interest] Fwd: Re: cant inherit Qmainwindow

Sean Harmer sean.harmer at maps-technology.com
Fri Mar 27 11:38:20 CET 2009


Forwarding to list...
----------  Forwarded Message  ----------

Subject: Re: [Qt-interest] cant inherit Qmainwindow
Date: Friday 27 Mar 2009
From: RPREMANAND RPREMANAND <premndbe at gmail.com>
To: Sean Harmer <sean.harmer at maps-technology.com>

#include<qapplication.h>
#include<mainwindow.h>
int main(int argc,char **argv)
{
QApplication a (argc,argv);
MainWindow *mw=new MainWindow;
mw->setGeometry(0,0,200,200);
a.setActiveWindow(mw);
mw->show();
return a.exec();
}
mainwindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include<qmainwindow.h>
class MainWindow:public QMainWindow
{
Q_OBJECT
public:
MainWindow(){

}
~MainWindow()
{
}

}
#endif

this is my sample code .
i have genrtd *.pro by qmake-project

pls suggst me solution
Thanks in Advance


On 3/27/09, Sean Harmer <sean.harmer at maps-technology.com> wrote:
>
> Hi,
>
> On Friday 27 March 2009 09:33:52 RPREMANAND RPREMANAND wrote:
> > i have the source.qt-x11-eval-src-4.4.1.
> > when i tried to create a basic applictn by inheriting Qwidget and
> > QMainwindow
> > but cant inherit qmainwindow or qwidget.iget the errors
> > main does not  have return type ,
> > main cant retrun other than int data type.
> > i i htink i have problem with env varbles or lib files.
> > can u suggets me a solution early possilble.
> Please post your code. It sounds like you have a basic C++ error to do with
> the return type of your int main() function. Can't tell where you are going
> wrong without seeing code though.
>
> Sean
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



-- 
Prem

-------------------------------------------------------



More information about the Qt-interest-old mailing list