created an alarm using qml. we can't add 'am' and 'pm' to the last spinner. how can we add it?
import Qt 4.7
import "content"
Rectangle {
width:238; height:197
property int hr
property int min
property int am
signal titleBarClicked(int hr,int min,int am)
Row {
y: 0; x:0; spacing: 20
Image {
id: image1
source: "content/spinner-bgc.png"
}
}
Row {
y: 0; x: 7; spacing:20
Spinner {
id: spinner
width:70; height: 197
focus: false
model: 13
itemHeight: 30
delegate: Text { font.pixelSize: 25; text: index; height: 30;font.bold:true;}
}
}
Row {
y: 0; x:77; spacing: 20
Image {
id: image2
source: "content/spinner-bgc.png"
}
}
Row {
y: 0; x:84; spacing:20
Spinner {
id: spinner2
width:70; height: 197
focus: true
model: 60
itemHeight: 30
delegate: Text { font.pixelSize: 25; text: index; height: 30;font.bold:true;}
}
}
Row {
y: 0; x:154; spacing: 20
Image {
id: image3
source: "content/spinner-bgc.png"
}
}
Row {
y: 0; x:161; spacing:20
Spinner {
id: spinner3
width:70; height: 197
focus: true
model: name
itemHeight: 30
delegate: Text {font.pixelSize: 25; text: "PM"; height:30;font.bold:true;}
Text {
id: name
text: ""
}
}
}
Row {
y: 0; x:231; spacing: 20
Image {
id: image4
source: "content/spinner-bgc.png"
}
}
Connections {
target:titleBarClicked(spinner.currentIndex,spinner2.currentIndex,spinner3.currentIndex)
}
}
import Qt 4.7
import "content"
Rectangle {
width:238; height:197
property int hr
property int min
property int am
signal titleBarClicked(int hr,int min,int am)
Row {
y: 0; x:0; spacing: 20
Image {
id: image1
source: "content/spinner-bgc.png"
}
}
Row {
y: 0; x: 7; spacing:20
Spinner {
id: spinner
width:70; height: 197
focus: false
model: 13
itemHeight: 30
delegate: Text { font.pixelSize: 25; text: index; height: 30;font.bold:true;}
}
}
Row {
y: 0; x:77; spacing: 20
Image {
id: image2
source: "content/spinner-bgc.png"
}
}
Row {
y: 0; x:84; spacing:20
Spinner {
id: spinner2
width:70; height: 197
focus: true
model: 60
itemHeight: 30
delegate: Text { font.pixelSize: 25; text: index; height: 30;font.bold:true;}
}
}
Row {
y: 0; x:154; spacing: 20
Image {
id: image3
source: "content/spinner-bgc.png"
}
}
Row {
y: 0; x:161; spacing:20
Spinner {
id: spinner3
width:70; height: 197
focus: true
model: name
itemHeight: 30
delegate: Text {font.pixelSize: 25; text: "PM"; height:30;font.bold:true;}
Text {
id: name
text: ""
}
}
}
Row {
y: 0; x:231; spacing: 20
Image {
id: image4
source: "content/spinner-bgc.png"
}
}
Connections {
target:titleBarClicked(spinner.currentIndex,spinner2.currentIndex,spinner3.currentIndex)
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks