Hi,
Using this example, firstly, I created an "Application > Qt Quick application project".
I didn't change the main.cpp and kept the Window part and entered the Rectangle section below that, as follows:
```
import QtQuick 2.6
import QtQuick.Window 2.2
Window {
visible: true
width: 640
height: 480
title: qsTr("Rec")
Rectangle {
id: root
x: 50; y: 10
width: 120; height: 240
color: "Blue"
Image {
id: triangle
x: root.width + width/2; y: height/2
source: "/triangle_red.png"
}
Text {
y: 50
width: root.width
color: "white"
horizontalAlignment: Text.AlignHCenter
text: "Triangle"
}
}
}
```
```
import QtQuick 2.6
import QtQuick.Window 2.2
Window {
visible: true
width: 640
height: 480
title: qsTr("Rec")
Rectangle {
id: root
x: 50; y: 10
width: 120; height: 240
color: "Blue"
Image {
id: triangle
x: root.width + width/2; y: height/2
source: "/triangle_red.png"
}
Text {
y: 50
width: root.width
color: "white"
horizontalAlignment: Text.AlignHCenter
text: "Triangle"
}
}
}
```
To copy to clipboard, switch view to plain text mode
The output is shown for Desktop. For other kits I just pressed the build button because I just needed the APK files.
My questions:
1- Is the type of the project I created exactly the one the book has used?
2-Do I need to keep the Window section? If so why isn't it shown in the example?
3- Shouldn't I change anything in main.cpp?
4- I built the project using the Arm Android kit but the size of the APK files for both Release and Debug modes are the same. I expected to have a smaller size for the Release mode.
Thank you.
Bookmarks