PDA

View Full Version : Moving object position in a layout



qtnewbi3
17th November 2011, 19:25
Hi,

I would like to simulate the water level increase / decrease in a bucket by using an arrow on the left side of the bucket. My method of taking the bucket height and moving the arrow based on an incoming value with respect to bucket height works fine. However, I would like to make this a stretchable widget and therefore I put the objects in a layout. However, when they are in a layout the arrow doesn't move even if it set to a different location.

So my question is I would like to simulate movement of the arrow in a layout so as to make the widget stretchable. I have tried using 2 vertical spacers on either side of the arrow and setting them in a vertical layout with the SizePolicy set to be Preferred/MinimumExpanding and I still cant get it to work. Sometimes, I see the arrow flicker to the top and the back to its original position i.e center.