I'm starting an application project using Qt 5.5 with visual studio 2013.
I have to create an highly interactive GUI, so I did research, and found that QML would be the best choice to fit my needs.
I took the basic .cpp
and .qml
files from a tutorial, the main looks like this.
#include <QtQml/QQmlComponent>
#include <QtQml/QQmlEngine>
#include <QtQml/QQmlContext>
#include <QtGui/QGuiApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
viewer.setMainQmlFile(QLatin1String("qml/main.qml"));
viewer.showExpanded();
return app.exec();
}
but I had this error while building:
'QDeclarativeView' : No such file or directory
so i added #include <QDeclarativeView>
but still had the error.
I can't figure out how to successfully build a Qt app using QML in Visual Studio, so any help would be welcomed.
I'm not even sure my .qml
file is in the good place.