- #ifndef _LOGINDLG_H_
- #define _LOGINDLG_H_
- #include <QtGui/QDialog>
- class CLoginDlg :public QDialog
- {
- Q_OBJECT
- public :
- CLoginDlg(QWidget* =0);
- public slots:
- virtual void accept();
- private:
- QLineEdit* usrLineEdit;
- QLineEdit* pwdLineEdit;
- };
- #endif
这是我的一个头文件
编译的时候报错。
In file included from moc_logindlg.cpp:10:
logindlg.h:12: error: ISO C++ forbids declaration of ‘QLineEdit’ with no type
logindlg.h:12: error: expected ‘;’ before ‘*’ token
logindlg.h:13: error: ISO C++ forbids declaration of ‘QLineEdit’ with no type
logindlg.h:13: error: expected ‘;’ before ‘*’ token
make: *** [moc_logindlg.o] Error 1
各位高人帮看看怎么解决。