Hello!
I am trying to do this example: http://gutenberg.troll.no/4.7-snapshot/qtbinding.html
It has compiled without errors and works well for all simulators, but when I compile it for phone it shows me an errors:
QDeclarativeView: no such file or directory.
QDeclarativeContext: no such file or directory.
main.cpp
main.qmlCode:#include <QApplication> #include <QDeclarativeView> #include <QDeclarativeContext> int main(int argc, char *argv[]) { QApplication app(argc, argv); QDeclarativeView view; QDeclarativeContext *context = view.rootContext(); context->setContextProperty("backgroundColor", QColor(Qt::yellow)); view.setSource(QUrl::fromLocalFile("main.qml")); view.show(); return app.exec(); }
Code:import QtQuick 1.0 Rectangle { width: 300 height: 300 color: backgroundColor Text { anchors.centerIn: parent text: "Hello Yellow World!" } }
My code is identical to tutorial, and I included "QT += declarative" to pro file. I am using QT 4.7.
Whats the matter can be here? Thanks in advance!





