PDA

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



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

Rectangle {
id='myrect'
...
}

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?

hema
4th August 2011, 09: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.

tuxit
4th August 2011, 14: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