qtextoption.h Expected unqualified-id before '\x9'
Hi everyone,
So I am getting this strange error:
qtextoption.h:140: error: expected unqualified-id before '\x9'
qtextoption.h:153: error: lvalue required as left operand of assignment
But this is only is I have
Code:
#include "PPincludes.h"
in my code below for cgui.h:
Code:
#ifndef CGUI_H
#define CGUI_H
#include <QMainWindow>
#include "PPincludes.h"
namespace Ui {
class CGUI;
}
//! The main application class
/*!
The CGUI class contains declarations of all variables and functions used
by the application. It is divided into Pre-processing, Run and Post-processing
groups.
*/
Q_OBJECT
public:
~CGUI();
protected:
private:
Ui::CGUI *ui;
};
#endif // CGUI_H
PPincludes.h is blank.
Then, cgui.cpp:
Code:
#include "cgui.h"
#include "ui_cgui.h"
ui(new Ui::CGUI)
{
ui->setupUi(this);
}
CGUI::~CGUI()
{
delete ui;
}
void CGUI
::changeEvent(QEvent *e
) {
switch (e->type()) {
ui->retranslateUi(this);
break;
default:
break;
}
}
Please help. I am not sure why it is giving me such a strange error.
The error dissappears if I remove #include "PPinclude.h"
Thank you in advance,
Ncrusader
-----------------------------------------------------------
Ok I figured it out,
Solution:
in the cgui.cpp file of the form class,
Code:
//***Must include QtGui in the beginning of the file***
#include <QtGui>
//***
#include <cgui.h>
#include <ui_cgui.h>
//etc
Cheers,
ncrusader
Re: qtextoption.h Expected unqualified-id before '\x9'
Hi ncrusader,
Do you know the reason why
#include<QtGui>
solves the problem?