Results 1 to 2 of 2

Thread: Suggestion on how to retrieve the pos of a GraphicsObject during animation

  1. #1
    Join Date
    May 2011
    Posts
    18
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Suggestion on how to retrieve the pos of a GraphicsObject during animation

    I had a GraphicsObject(let say a missle) and it can animate just like the animation of sprites and also clickable since it has a mousepressevent. However I used QPropertyAnimation to handle the object movements. Then I had another GraphicsObject similar to the previous one (let say this time a explosion). So the scenario is when the user clicks on the missle (moving downwards) and the object will be deleted but the hard part was to be able to create the explosion animation exactly at the position where the missle was clicked. Is there any suggestion on how to retrieve the position or should I change the structure of my code into a better form rather using the QPropertyAnimation? Please help me. (Forgive me for the grammer mistakes )

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

    Default Re: Suggestion on how to retrieve the pos of a GraphicsObject during animation

    QGraphicsItem::pos() will give you the current position of an item.
    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.


Similar Threads

  1. Need suggestion regarding TCP/IP and Ethernet
    By sudheer168 in forum Qt Programming
    Replies: 2
    Last Post: 27th April 2009, 08:07
  2. suggestion for using strlen()
    By joseph in forum General Programming
    Replies: 3
    Last Post: 15th September 2008, 19:34
  3. Printing suggestion
    By Raccoon29 in forum Newbie
    Replies: 0
    Last Post: 22nd April 2008, 09:14
  4. SVG suggestion
    By Gopala Krishna in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2007, 14:35

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.