In this video I have explained declarative part of the code inside QML file of the Qt Hello World app for Symbian^3 phones.
Covered in this episode:
- QML code explained
This post (and video featured in it) is 3nd part of 3 part whole. You should read 1st and 2nd article before reading this one.You can find them here:
Hello World for Symbian^3 with Qt Quick components done using Qt Creator
HelloWorld Qt App Explained part 1 of 2
Here is the video:
Here is the Source Code - main.qml file looks like this:
import QtQuick 1.1
import com.nokia.symbian 1.1
PageStackWindow {
id: window
initialPage: MainPage {tools: toolBarLayout}
showStatusBar: true
showToolBar: true
ToolBarLayout {
id: toolBarLayout
ToolButton {
flat: true
iconSource: "toolbar-back"
onClicked: window.pageStack.depth <= 1 ? Qt.quit() : window.pageStack.pop()
}
}
}
MainPage.qml file looks like this:
import QtQuick 1.1
import com.nokia.symbian 1.1
Page {
id: mainPage
Text {
anchors.centerIn: parent
text: qsTr("Hello world!")
color: platformStyle.colorNormalLight
font.pixelSize: 20
}
}
No comments:
Post a Comment