View Full Version : Getting bottom, top, left, right properties of an item (e.g. a rect) as double

3rd August 2011, 12:34
I tried to output the values of a

Rectangle {

with myrect.top myrect.left

and it doesn't return a double or real value that i can use in calculations

it writes only QVariant(QDeclarativeAnchorLine)

i need to calculate and do some control, is it possible or qml does not allow us to do such calculations?

4th August 2011, 08:49
calculations means which type of calculations?

rect.x and rect.y gives where to start the rect.
width and height gives dimensions of rect.

4th August 2011, 13:33
i do not only want where the rect starts,
i want top most, left most, right most, bottom most coordinats.

also not always a rectangle, usually a polygon which can be drawn using Box2D.
I think i want more than qml can do :S