What I am trying to do is test QML in qtcreator. I have newest version Qt Creator 2.8.1 based on Qt 5.1.1.
I would like to add qml to my c++ application. I tried many ways. The most reasonable look using QDeclarativeView but I can't include it.
in pro files I add
QT += core gui declarative
I tried add quick, qml aswell but then I still don't see qtquick or declarative libraries.
I can see Qt Quick 2 UI
project in qmlViewer by go
Tools->external->qtquick->qmlviewer
When I try to build Qt Quick 2 Application(Built-in Types) I get 3x
"Cannot open include file "QtQuick/QQuickView" no such file or directory.
I want to do simple c++ application using qml thanks for any help. I read many tutorials but most of them start after build. I have problem with run application no qml code.
You can't include it, because it's qt quick 1 and you'd like to use qt quick 2. To be able to include QDeclarativeView
you need:
QT += declarative
in your .pro
file.
Look at QQuickView
for the qt quick 2 alternative, for which you need:
QT += qml quick
in your .pro
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With