Using qml in the qt application
-
hi all , am a beginner in developing qt applications , i need a full example for using a qml file in the qt application , please give me a full example - every line i must write please - as when i copy it , it works properly ...
my regards :))
-
-
my thanks to you , BUT ...
the code isn't working , it gave me the following errors : 'class QDeclarativeView' has no member named 'setSource'
error: 'QUrl' has not been declarederror: 'class QDeclarativeView' has no member named 'show'
-
i used " #include<QtDeclarative/qdeclarativeview.h> " instead of " #include <QDeclarativeView>
" because it couldn't find it , & now i have another errors like that one error: undefined reference to `_imp___ZN16QDeclarativeView9setSourceERK4QUrl' -
when i used " #include <QDeclarativeView> " i got that error " error: QDeclarativeView: No such file or directory "
-
Propably you have forgotten to set QT += declarative in your pro file!
-
yeaaaaaaaa thaaaaaaanks tooooo much :):D it works :))
i have another question , how to add an icon & add event to it in qml ?
-
May be you should look at Image and MouseArea items in qml documentation @ http://doc.qt.nokia.com/4.7/qdeclarativeelements.html
-
thanks so much :))
-
Hello mot_201,you should read the Qt documentation,because it will solve your most of the problems..
-
ok imrrk , i'll do ,, thanks so much :))