Results 1 to 1 of 1

Thread: Draw polygon in QML

  1. #1
    Join Date
    Jul 2011
    Posts
    22
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Draw polygon in QML

    Hello,
    i am trying to draw polygon in QML.
    I can draw rectangle with

    Qt Code:
    1. Rectangle { //rectangle properties}
    To copy to clipboard, switch view to plain text mode 

    i imagine i can draw polygons with

    Qt Code:
    1. Polygon { //polygon points }
    To copy to clipboard, switch view to plain text mode 

    i searched and found it can be like this

    Qt Code:
    1. import Box2D
    2.  
    3. Polygon { //polygon points }
    To copy to clipboard, switch view to plain text mode 

    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
    Last edited by tuxit; 27th July 2011 at 15:18.

Similar Threads

  1. Thicker polygon lines
    By Johncdy in forum Qt Programming
    Replies: 1
    Last Post: 15th March 2011, 09:10
  2. pixmap to polygon
    By mhoover in forum Qt Programming
    Replies: 1
    Last Post: 14th October 2009, 09:02
  3. Draw polygon with holes
    By crocpulsar in forum Qt Programming
    Replies: 4
    Last Post: 14th March 2009, 06:31
  4. Rotating the polygon
    By navi1084 in forum Qt Programming
    Replies: 1
    Last Post: 4th September 2008, 00:41
  5. Creating clipped polygon
    By maverick_pol in forum Qt Programming
    Replies: 10
    Last Post: 27th August 2008, 23:15

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.