QML and Database question
-
Hi everyone
I would want to know how to connect my game with a database.. My game app would need one so I might wanna ask those who knows or have any idea how to connect to database? My game uses qml and javascript for game logic and I am wondering if this would work because basically i have no idea..
Second
@
Button{
id:playicon
Image{
source: "K:/mukha/playicon.png"
}
onClicked:{
menuPanel.state="hide"
}
}
@the codes above the codes for my play button... If the user clicks the play button, the device would then display let's say the first area/level of the game.. Do i have to hide my menu panel like the codes displayed above? Is it possible to jump from one "frame" or "scene" to another "scene"?
Thanks in advance for the answers and suggestions
God Bless
[EDIT: code formatting (missing second @), Volker]
-
Regarding the database: here is an "example":http://doc.qt.nokia.com/4.7-snapshot/declarative-sqllocalstorage.html
About your second question. You could use a "loader item":http://doc.qt.nokia.com/4.7-snapshot/qml-loader.html to first load your menu and then your levels. Otherwise you could also use "states":http://doc.qt.nokia.com/4.7-snapshot/qdeclarativestates.html
[EDIT: fixed link (surplus space), Volker]