Results 1 to 2 of 2

Thread: Drag Move

  1. #1
    Join Date
    Jan 2006
    Qt products
    Unix/X11 Windows

    Default Drag Move

    Hi all,
    How can I override the dragged object representation in a custom widget which accepts dropping?

    I mean I have a Custom Menu and I want to perform painting operation while a user drag an object, in the examples I found the only operation in DragMoveEvent is just accepting the action or ignore.

    Thanks for any tips on that


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

    Default Re: Drag Move

    You can either use QDrag::setPixmap to set a drag indicator (but you need to have access to QDrag object) or simply change the cursor during the drag (for example in dragEnter and dragLeave events) using QCursor::setShape, QWidget::setCursor and/or QApplication::setOverrideCursor.

Similar Threads

  1. Drag & drop with model/view (Qt4)
    By yogeshm02 in forum Qt Programming
    Replies: 16
    Last Post: 19th September 2011, 20:36
  2. Drag and drop revisited
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 30th June 2006, 16:41
  3. Move child widget along with the parent widget
    By sreedhar in forum Qt Programming
    Replies: 2
    Last Post: 15th May 2006, 12:00
  4. Drag vs range-select
    By drhex in forum Qt Programming
    Replies: 0
    Last Post: 19th February 2006, 20:39
  5. Drag 'n Drop problem
    By kiker99 in forum Qt Programming
    Replies: 4
    Last Post: 16th January 2006, 16:35


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.