|
2013-08-17
, 18:51
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#2
|
The Following User Says Thank You to qwazix For This Useful Post: | ||
|
2013-08-17
, 19:24
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#3
|
I suspect some reparenting takes place at runtime. Try anchoring with id instead of parent.
QML TextField: Cannot anchor to an item that isn't a parent or sibling.
|
2013-08-17
, 21:29
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#4
|
TextField { y: page.height - height }
|
2013-08-17
, 22:20
|
|
Posts: 2,355 |
Thanked: 5,249 times |
Joined on Jan 2009
@ Barcelona
|
#5
|
The Following 2 Users Say Thank You to javispedro For This Useful Post: | ||
|
2013-08-18
, 07:38
|
|
Moderator |
Posts: 2,622 |
Thanked: 5,447 times |
Joined on Jan 2010
|
#6
|
The Following 2 Users Say Thank You to qwazix For This Useful Post: | ||
|
2013-08-20
, 09:46
|
Posts: 3,328 |
Thanked: 4,476 times |
Joined on May 2011
@ Poland
|
#7
|
import QtQuick 2.0 import Sailfish.Silica 1.0 import Sailfish.Silica.theme 1.0 Page { id: page // To enable PullDownMenu, place our content in a SilicaFlickable SilicaFlickable { id: p1flick anchors.fill: parent // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView PullDownMenu { MenuItem { text: "Settings" } MenuItem { text: "Fullscreen" onClicked: { header.hidden = !header.hidden; console.log(header.state) } } } // Tell SilicaFlickable the height of its content. contentHeight: childrenRect.height // Place our content in a Column. The PageHeader is always placed at the top // of the page, followed by our content. Column { id: content width: page.width spacing: Theme.paddingMedium PageHeader { id: header property bool hidden: false } Text { text: "test" height: parent.height - header.height Component.onCompleted: { console.log(parent.height); console.log(header.height) } } TextField { id: textfield text: "test2" } } } }
QQuickWindow: possible QQuickItem::polish() loop
|
2013-08-21
, 23:58
|
|
Posts: 2,355 |
Thanked: 5,249 times |
Joined on Jan 2009
@ Barcelona
|
#8
|
height: parent.height - header.height
The Following User Says Thank You to javispedro For This Useful Post: | ||
I'm playing around with Sailfish Silica. Column is a sub-optimal solution in my case, simple anchoring would be the best here. That's my code:
What am I doing wrong?
If you want to support my work, you can donate by PayPal or Flattr
Projects no longer actively developed: here