Results 1 to 3 of 3

Thread: Reusing a QPainterPath

  1. #1
    Join Date
    Jun 2007
    Posts
    56
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Reusing a QPainterPath

    Hello, Mic here...

    Looking through the documentation I don't find any way to clear a painter path so that I can put another path in it. My code now has to delete the previous one and allocate a new one when I want to change the path. The text for the moveTo() method mentions closing out a sub-path but I don't think this is what I want.

    Any help/ideas would be appreciated.

    -Mic

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Reusing a QPainterPath

    Simply assign an empty object to it.

    Qt Code:
    1. doSomethingWith(path);
    2. path = QPainterPath();
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    Micawber (19th March 2009)

  4. #3
    Join Date
    Jun 2007
    Posts
    56
    Thanks
    6
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Reusing a QPainterPath

    Thanks Wysota! I'm still learning my way with this C++ stuff.

    -Mic

Similar Threads

  1. Replies: 2
    Last Post: 24th January 2009, 08:11
  2. Advices for animating drawing of a QPainterPath?
    By Gnurou in forum Qt Programming
    Replies: 0
    Last Post: 4th July 2008, 15:17
  3. QPainterPath outlining
    By viridis in forum Qt Programming
    Replies: 2
    Last Post: 14th March 2008, 19:32
  4. QPainterPath horizontal flip
    By bunjee in forum Qt Programming
    Replies: 2
    Last Post: 28th October 2007, 20:17
  5. QPainterPath drawing problem
    By shad in forum Qt Programming
    Replies: 3
    Last Post: 17th January 2007, 13:30

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.