I think it is BUG in QML element Flow
-
wrote on 11 Dec 2010, 12:27 last edited by
The Flow Element doesn't work properly. I tried to reverse the direction of the layout by changing the flow property like this
@
import Qt 4.7
Rectangle{
id:main
width:300; height:300Flow{ flow:"RightToLeft" spacing:40 Rectangle{id:one; width:30; height:30; color:"green"} Rectangle{id:two; width:30; height:30; color:"red"} }
}
@ -
wrote on 11 Dec 2010, 12:32 last edited by
From the "documentation":http://doc.qt.nokia.com/latest/qml-flow.html#flow-prop :
Possible values are:
Flow.LeftToRight (default) - Items are positioned next to to each other from left to right until the width of the Flow is exceeded, then wrapped to the next line.
Flow.TopToBottom - Items are positioned next to each other from top to bottom until the height of the Flow is exceeded, then wrapped to the next column.Is this the effect you desired, by the way? (I know this flips the elements too)
@
import QtQuick 1.0Rectangle {
width:300; height:300
x: width; transform: Rotation {axis { x: 0; y: 1; z: 0 } angle: 180} // RightToLeft?
Flow {
spacing:40
Rectangle{id:one; width:30; height:30; color:"green"}
Rectangle{id:two; width:30; height:30; color:"red"}
}
}@ -
wrote on 11 Dec 2010, 12:58 last edited by
thank you xsacha,
but how about right to left culture , like Arabic language, the layout system doesn't offer that, in QML.but the value RightToLeft comes from the autocompletion system in QtCreator!!!
-
wrote on 11 Dec 2010, 13:05 last edited by
Hmm, my QtCreator doesn't offer any RightToLeft auto-completion. I'm using Qt4.7.1/QtQuick 1.0
They are looking at adding this in future.
See here: http://bugreports.qt.nokia.com/browse/QTBUG-11042Target is QtQuick 1.1
-
wrote on 12 Dec 2010, 17:03 last edited by
*thank you again Mr xsacha
It might be the flow property in layout Item.... I think so *
1/5