Home > Mobile >  Qt5.7.0 Open CASCADE (version 7.2.0) expert guidance, thank you!
Qt5.7.0 Open CASCADE (version 7.2.0) expert guidance, thank you!

Time:09-17




#include
# include
using namespace std;

Int main (int arg c, char * argv [])
{
//cout & lt; <"Hello World!" //return 0;
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 directory

CodePudding user response:

QApplication is the header file in Qt, Qt5 in $QTDIR \ include \ QtWidgets inside

CodePudding user response:

How do you configure the opencascade qt

CodePudding user response:

Qt5 generally see your pro file, if there is any
Qt +=GUI widgets

QApplication is what widgets,
  •  Tags:  
  • Qt
  • Related