Results 1 to 3 of 3

Thread: DragDrop function in Qt

  1. #1
    Join Date
    Nov 2011
    Location
    Karlsruhe, Germany
    Posts
    57
    Thanks
    10
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Smile DragDrop function in Qt

    I want to implement a dragdrop function in my Qt App,
    but I have no idea usually in Qt how I should start.

    e.g. in the visual studio, I can drag one element with its content to the editor window:

    1.png

    then i can drop this element there:

    2.png

    I want my Qt App can be like the editor window, which reacts when an element comes to its area.
    how i should start with Qt?

  2. #2
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: DragDrop function in Qt

    http://qt-project.org/doc/qt-4.8/exa...aganddrop.html

    especially draggable text
    they use
    void dragEnterEvent(QDragEnterEvent *event)
    and
    void dropEvent(QDropEvent *event)
    "Behind every great fortune lies a crime" - Balzac

  3. The following user says thank you to wagmare for this useful post:

    cic (29th August 2013)

  4. #3
    Join Date
    Nov 2011
    Location
    Karlsruhe, Germany
    Posts
    57
    Thanks
    10
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Windows

    Default Re: DragDrop function in Qt

    Thx thats what i need

Similar Threads

  1. Replies: 11
    Last Post: 5th September 2012, 20:47
  2. Replies: 0
    Last Post: 10th March 2010, 08:13
  3. QDoubleSpinWidget & DragDrop+ContextMenu
    By prashant in forum Qt Programming
    Replies: 0
    Last Post: 12th September 2009, 16:28
  4. DragDrop Color
    By prashant in forum Qt Programming
    Replies: 7
    Last Post: 7th September 2009, 18:53
  5. Replies: 2
    Last Post: 8th August 2006, 15:09

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.