Results 1 to 10 of 10

Thread: passing a QPainter object to widgets

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    5
    Thanked 86 Times in 81 Posts

    Default Re: passing a QPainter object to widgets

    Quote Originally Posted by jacek
    So the problem is probably because you create a copy that QPainter.
    Qt Official Documentation says
    QPainter::QPainter ( QPaintDevice * pd )
    Constructs a painter that begins painting the paint device pd immediately.
    This constructor is convenient for short-lived painters, e.g. in a paint event and should be used only once.

    The constructor calls begin() for you and the QPainter destructor automatically calls end().
    So, you must use QPainter pointer.
    A camel can go 14 days without drink,
    I can't!!!

  2. #2
    Join Date
    Jan 2006
    Location
    La Spezia,Italy
    Posts
    77
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    9
    Thanked 5 Times in 5 Posts

    Default Re: passing a QPainter object to widgets

    You were right, I resolved doing that way.

    Thank you very much boys!

Similar Threads

  1. Replies: 0
    Last Post: 11th November 2008, 16:36
  2. Passing an object from one form to the other.
    By cbarmpar in forum Qt Programming
    Replies: 10
    Last Post: 3rd September 2008, 15:12
  3. passing an object
    By mickey in forum General Programming
    Replies: 3
    Last Post: 16th January 2008, 11:27
  4. Replies: 2
    Last Post: 17th May 2006, 22:01
  5. Passing Object to dll
    By ankurjain in forum Qt Programming
    Replies: 2
    Last Post: 1st April 2006, 10:50

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
  •  
Qt is a trademark of The Qt Company.