summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2009-10-28 05:44:26 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2009-10-28 05:44:26 (GMT)
commitdbba440da0677b8174d087d498d3d0dbd465548a (patch)
tree1b63947db6ba59703230ea3e3c767dcbb4a1ab4d /src/declarative
parent6be1b102d27610e7d4417222eb4b4dd80d453295 (diff)
downloadQt-dbba440da0677b8174d087d498d3d0dbd465548a.zip
Qt-dbba440da0677b8174d087d498d3d0dbd465548a.tar.gz
Qt-dbba440da0677b8174d087d498d3d0dbd465548a.tar.bz2
Fix dynamic example
Includes adding a comment to the positioners to alert others that you shouldn't use anchors as well.
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/fx/qfxpositioners.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/declarative/fx/qfxpositioners.cpp b/src/declarative/fx/qfxpositioners.cpp
index cc385e0..86a069d 100644
--- a/src/declarative/fx/qfxpositioners.cpp
+++ b/src/declarative/fx/qfxpositioners.cpp
@@ -375,6 +375,10 @@ Column {
\endqml
\endtable
+ Note that the positioner assumes that the x and y positions of its children
+ will not change. If you manually change the x or y properties in script, bind
+ the x or y properties, or use anchors on a child of a positioner, then the
+ positioner may exhibit strange behaviour.
*/
/*!
@@ -539,6 +543,11 @@ Row {
\endqml
\image horizontalpositioner_example.png
+ Note that the positioner assumes that the x and y positions of its children
+ will not change. If you manually change the x or y properties in script, bind
+ the x or y properties, or use anchors on a child of a positioner, then the
+ positioner may exhibit strange behaviour.
+
*/
/*!
\qmlproperty Transition Row::remove
@@ -659,7 +668,7 @@ void QFxRow::doPositioning()
child->setX(hoffset);
setMovingItem(0);
}
- if(!child->width() || !child->height()){//don't advance for invisible children
+ if(child->width() && child->height()){//don't advance for invisible children
hoffset += child->width();
hoffset += spacing();
}
@@ -707,6 +716,11 @@ Grid {
}
\endqml
\endtable
+
+ Note that the positioner assumes that the x and y positions of its children
+ will not change. If you manually change the x or y properties in script, bind
+ the x or y properties, or use anchors on a child of a positioner, then the
+ positioner may exhibit strange behaviour.
*/
/*!
\qmlproperty Transition Grid::remove