Results 1 to 2 of 2

Thread: How to Convert a QPainter object to QObject

  1. #1
    Join Date
    Jan 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default How to Convert a QPainter object to QObject

    Hi,

    I am a new bee..

    I need to do animation(Fix a point of rectangle and animate it to move 180 degree).
    I am trying to do this by using QPropertyAnimation. this accepts a QObject where as rectangle i have drawn is using QPainter.
    Please help....

    Thanks and Regards
    Srinivas

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: How to Convert a QPainter object to QObject

    The painter is just API for drawing, you animate the values you are using for drawing.

    So the class that holds your data needs to be a QObject.

    Cheers,
    _

Similar Threads

  1. Replies: 1
    Last Post: 22nd January 2014, 20:22
  2. Replies: 3
    Last Post: 28th January 2013, 19:26
  3. Replies: 7
    Last Post: 15th December 2009, 10:01
  4. [solved] Which object type is QObject::sender()?
    By ricardo in forum Qt Programming
    Replies: 6
    Last Post: 8th May 2009, 21:03
  5. How to convert QVariant to my custom object?
    By troorl_ua in forum Qt Programming
    Replies: 3
    Last Post: 15th July 2007, 18:59

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.