#include
# include
using namespace std;
Int main (int arg c, char * argv [])
{
//cout & lt; <"Hello World!"
QApplication app (arg c, argv);
QTextCodec: : setCodecForTr (QTextCodec: : codecForLocale ());
//install QT's own translation files
QTranslator translatorQT;
{
QStringList environment=QProcess: : systemEnvironment ();
QString STR.
Bool bFinded=false;
Foreach (STR, environment)
{
If (STR) startsWith (" QTDIR="))
{
BFinded=true;
break;
}
}
If (bFinded)
{
STR=STR. Mid (6);
BFinded=translatorQT. Load (" qt_ "+ QLocale: : system (). The name (), STR., append ("/translations/"));
If (bFinded)
App. InstallTranslator (& amp; TranslatorQT);
The else
QDebug () & lt;
The else
{
QDebug () & lt;
}
WGLWidget w;
w.show();
Return the app. The exec ();
}
C: \ Users \ Administrator W7-201605101142 \ Personal \ untitled2 \ main CPP: 2: error: QApplication: No to the file or directory
CodePudding user response:
Why didn't tip CApplication files and directoryCodePudding user response:
QApplication is the header file in Qt, Qt5 in $QTDIR \ include \ QtWidgets insideCodePudding user response:
How do you configure the opencascade qtCodePudding user response:
Qt5 generally see your pro file, if there is anyQt +=GUI widgets
QApplication is what widgets,