Results 1 to 6 of 6

Thread: drop image fly back

  1. #1
    Join Date
    Feb 2006
    Posts
    60
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default drop image fly back

    Hi,
    I am using Qt4.1.1. I have two widgets that accept drops. I have an image attached to drag.
    If a widget does not accept drop then the image must fly to the original point it was dragged from (same as the one seen in browsers, try to drag an image from the browser and drop it on status bar).

    Please reply me if this can be done in Qt.

    Regards,
    Sree

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine,Lviv
    Posts
    454
    Thanks
    9
    Thanked 27 Times in 27 Posts
    Qt products
    Qt3
    Platforms
    Unix/X11 Windows

    Default Re: drop image fly back

    Yes this can be done in Qt
    a life without programming is like an empty bottle

  3. #3
    Join Date
    Feb 2006
    Posts
    60
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: drop image fly back

    Thanks for the reply.
    But please do reply me how to do it.

    regards,
    sree

  4. #4
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: drop image fly back

    http://doc.trolltech.com/4.1/dnd.html

    As for the "flyback" animation, you may have to implement that yourself by showing and moving a transparent widget on a timer.
    Last edited by Chicken Blood Machine; 7th March 2006 at 21:31.
    Save yourself some pain. Learn C++ before learning Qt.

  5. #5
    Join Date
    Feb 2006
    Posts
    60
    Thanks
    21
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: drop image fly back

    Thanks for the reply,
    But can you provide me an example code of how to do it

    regards,
    sreed

  6. #6
    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: drop image fly back

    Create a widget representing your "icon", create a timer and animate (move) the widget on each timeout. Look at QTimer class docs for details. There are some examples there.

Similar Threads

  1. can Qlabel display a series of image one by one ?
    By jirach_gag in forum Qt Tools
    Replies: 3
    Last Post: 11th August 2008, 15:36
  2. Finding marks on scanned image for alignment
    By caduel in forum Qt Programming
    Replies: 1
    Last Post: 23rd September 2007, 02:10
  3. problem with the back ground image
    By Seema Rao in forum Qt Programming
    Replies: 1
    Last Post: 17th April 2006, 21:34
  4. How and when to repaint a widget ?
    By yellowmat in forum Newbie
    Replies: 7
    Last Post: 3rd April 2006, 16:36
  5. Question about updating an image on screen
    By SkripT in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2006, 19:01

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.