How to add 6 strings to a spinner
How to add 6 strings to a spinner
I use 2 spinner to select the theme and categories of a game.
I have 6themes(strings) for first spinner and 60categories(strings) for the second spinner.
It worked but the problem is i cant give more than two string to a spinner.
Is it possible to add more strings??
I have used the following code:
import Qt 4.7
import "content"
Rectangle {
id:myrect
width:330; height:125
Row {
y: 0; x:0; spacing: 20
Image {
id: image1
source: "content/spinner-bgc.png"
}
}
Row {
y: 0; x: 7; spacing: 10
Spinner {
id: spinner1
width:155; height: 125
focus: true
model: 6
itemHeight: 30
delegate: Text { font.pixelSize: 12; text:"Theme"; height: 30;font.bold:true;}
}
}
Row {
y: 0; x: 162; spacing: 20
Image {
id: image2
source: "content/spinner-bgc.png"
}
}
Row {
y: 0; x:169; spacing: 20
Spinner {
id: spinner2
width:155; height: 125
focus: true
model: 60
itemHeight: 30
delegate: Text { font.pixelSize:12; text: "Category"; height: 30;font.bold:true}
}
}
Row {
y: 0; x:324; spacing: 20
Image {
id: image3
source: "content/spinner-bgc.png"
}
}
}
Thanks in advance
What is a spinner?
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
look into his other thread he created this morning. there is some code.
edit: but please don't ask me what he is doing there. I have no idea. it's not c++...
Its QML.but please don't ask me what he is doing there. I have no idea. it's not c++...
.....................
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
FelixB (28th July 2011)
Bookmarks