PDA

View Full Version : Draw polygon in QML



tuxit
27th July 2011, 16:13
Hello,
i am trying to draw polygon in QML.
I can draw rectangle with


Rectangle { //rectangle properties}

i imagine i can draw polygons with


Polygon { //polygon points }

i searched and found it can be like this


import Box2D

Polygon { //polygon points }

my questions:

i can not succeed to compile box2d source code.

(i am new to qt and c++, understand qml a little but afraid from writing a piece of c++ and use it in QML)

so, could not i use some component of qt self libraries without integrating c++ and qml?

i found QPolygonF but only in c++ code examples, is not there a way to use it in QML?

low possibility, but does somebody have box2d libraries compiled for linux?

thanks for any idea