Error trying to compile a simple code: Q_OBJECT
I have
Code:
C:/Users/dimitar/Documents/trebovano-isporacano/mainWindow.h:14: error: ISO C++ forbids declaration of `Q_OBJECT' with no type
The code is :
Code:
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#incluse <QMainWindow>
{ Q_OBJECT
public:
MainWindow();
protected:
}
#endif // MAINWINDOW_H
Whats the problem?
just found out i wrote incluse instead of include :D. nvm delete the topic :(*
Re: Error trying to compile a simple code: Q_OBJECT
Looks to me like it can't find the include file
Re: Error trying to compile a simple code: Q_OBJECT
Looks like you misspelled the word "include". And your class definition should end with a semi-colon.