Results 1 to 2 of 2

Thread: QGraphicsPolygonItem Returning line to start

  1. #1

    Default QGraphicsPolygonItem Returning line to start

    Hey,

    I have a QGraphicsPolygonItem, i'm capturing a mouseEvents->scenePos() and <<'ing it to the QGraphicsPolygonItem->polygon()

    I'm almost getting what I want, but as I draw, there's always a line from my current position returning to my start position. See pictures where there's a straight line (pointed in red) from the green end point to the blue start point.

    Why does this line exist? I dont want the polygon to be closed, i just want a 'freehand line'.
    Am I using the correct shape?

    Any help to stop this closing line appearing would be excellent.
    Attached Images Attached Images

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsPolygonItem Returning line to start

    How are u adding the QGraphicsPolygonItem to the scene ? can we see the code ?

    Or may be you can look at using QGraphicsPathItem . May be QGraphicsPolygonItem closes the polygon.

Similar Threads

  1. QTcpSocket exception.
    By Fastman in forum Qt Programming
    Replies: 9
    Last Post: 29th January 2008, 13:51
  2. Some very weird compilation warnings
    By MarkoSan in forum Qt Programming
    Replies: 21
    Last Post: 23rd January 2008, 16:48
  3. Qwizard crashed when created in a slot
    By joshlareau in forum Qt Programming
    Replies: 9
    Last Post: 15th January 2008, 09:16
  4. KDE/QWT doubt on debian sarge
    By hildebrand in forum KDE Forum
    Replies: 13
    Last Post: 25th April 2007, 06:13
  5. QTableView paints too much
    By Jimmy2775 in forum Qt Programming
    Replies: 2
    Last Post: 26th July 2006, 18:42

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.