I'm getting a linker error that a whole host of symbols including QQmlEngine
and QQmlComponent
constructors are undefined, from the main.cpp:
#include <QCoreApplication>
#include <QtQml/QQmlEngine>
#include <QtQml/QQmlComponent>
#include <QtQml/QQmlContext>
int main(int argc, char* argv[]){
QCoreApplication app(argc, argv);
QQmlEngine eng;
QQmlComponent component(&eng, QUrl::fromLocalFile("app.qml"));
component.create();
}
I've run qmake -project
, and rebuilt all.
Browsing other questions, and the docs, it seems the include should be QQmlEngine
, but this is not found, and QtQml/QQmlEngine
is. Are they one in the same, or is that the problem?