Results 1 to 2 of 2

Thread: dragging

  1. #1
    Join Date
    Jan 2006
    Posts
    976
    Thanks
    53
    Qt products
    Qt3
    Platforms
    Windows

    Default dragging

    Hi, do anyone know if is possible ( I have 2 widgetGL) drag a .jpg show in wid1 onto wid2?? I'd like see this .jpg moving between two widget while I dragging.....thanks
    Regards

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

    Default Re: dragging

    Yes, it's possible.

    Use QDragObject::setPixmap() to set the drag indicator (your jpeg image) but use QImageDrag instead of QDragObject so that you can use setImage() to set your jpeg image as contents of the drag. Remember to set widgets to accept drops and reimplement proper events (mouse press and mouse move) to start the drag. See docs of d&d for details.

Similar Threads

  1. Replies: 11
    Last Post: 4th July 2006, 15:09
  2. dragging
    By mickey in forum Newbie
    Replies: 5
    Last Post: 11th March 2006, 00:26

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.