|
|
2012-03-30
, 17:23
|
|
Posts: 1,313 |
Thanked: 2,976 times |
Joined on Jun 2011
@ Finland
|
#2
|
| The Following User Says Thank You to ajalkane For This Useful Post: | ||
|
|
2012-03-30
, 17:53
|
|
Posts: 241 |
Thanked: 324 times |
Joined on Dec 2010
|
#3
|
|
|
2012-03-30
, 17:57
|
|
Posts: 324 |
Thanked: 371 times |
Joined on Dec 2009
@ Vancouver, BC
|
#4
|
| The Following User Says Thank You to Slocan For This Useful Post: | ||
|
|
2012-03-30
, 18:17
|
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#5
|
PageStackWindow{
Page {
Text { text: "page1" }
}
Page {
Text { text: "page2" }
}
}
property string myPageTitle
Text { text: myPageTitle }
MainPage { myPageTitle: "page1" }
| The Following User Says Thank You to qwazix For This Useful Post: | ||
|
|
2012-03-30
, 19:01
|
|
Posts: 241 |
Thanked: 324 times |
Joined on Dec 2010
|
#6
|
I will have more questions when i play with it some more|
|
2012-03-30
, 19:09
|
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#7
|
|
|
2012-03-30
, 20:25
|
|
Posts: 241 |
Thanked: 324 times |
Joined on Dec 2010
|
#8
|
|
|
2012-03-30
, 21:39
|
|
Posts: 241 |
Thanked: 324 times |
Joined on Dec 2010
|
#9
|
Page {
tools: commonTools
Label {
id: label
anchors.centerIn: parent
text: qsTr("Hello world!")
visible: false
}
Rectangle {
id: header
height: 72
width: parent.width
color: "light blue"
Rectangle {
id: boundbox
height: 50
anchors.centerIn: parent
width: 448
color: "transparent"
TextField {
id: searchBox
placeholderText: "Search"
maximumLength: 80
anchors.fill: boundbox
}
}
}
}
|
|
2012-03-31
, 12:25
|
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#10
|
I tried to get a search box that occupies almost the length of the header, but I think it is a bit messy, also the height is an arbitrary height I put. Is there a cleaner way to achieve this? It's quite hardcoded ratch right now. The default textfield element that the SDK provides is probably like half the width of the screen....here's the code
Code:Page { tools: commonTools Label { id: label anchors.centerIn: parent text: qsTr("Hello world!") visible: false } Rectangle { id: header height: 72 width: parent.width color: "light blue" Rectangle { id: boundbox height: 50 anchors.centerIn: parent width: 448 color: "transparent" TextField { id: searchBox placeholderText: "Search" maximumLength: 80 anchors.fill: boundbox } } } }
Page {
tools: commonTools
Label {
id: label
anchors.centerIn: parent
text: qsTr("Hello world!")
visible: false
}
Column{
Rectangle {
id: header
height: 72
width: parent.width
color: "light blue"
TextField {
id: searchBox
placeholderText: "Search"
width: 448
maximumLength: 80
anchors.centerIn: parent
}
}
NextElement{
}
}
}
| The Following User Says Thank You to qwazix For This Useful Post: | ||
Can someone break this down into stupid for a newbie trying to learn QML
Thank you