Results 1 to 3 of 3

Thread: Drag Drop in QT

  1. #1
    Join Date
    Mar 2009
    Location
    delhi India
    Posts
    56
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Drag Drop in QT

    Hi,
    I have implemented Drag drop into my application for QTreeWidget.
    I have successfullly got the dragged object information but how to get the target location (QTreeWidgetItem of QTreeview) in dropEvent(QDropEvent *event) function...?

    Any help would be appreciated.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Drag Drop in QT

    I am not sure I follow.
    The target is the object that has the dropeEvent()...
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Mar 2009
    Location
    delhi India
    Posts
    56
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: Drag Drop in QT

    Hi,
    I could solve the above problem.
    I was looking for the QTreeWidgetItem reference (target location or dropped location on QTreeWidget )..
    This could be achieved simple by itemAt(event->pos())..

    Any ways thanx for the reply.

Similar Threads

  1. Replies: 2
    Last Post: 13th October 2010, 21:51
  2. Replies: 3
    Last Post: 10th June 2010, 15:13
  3. Replies: 0
    Last Post: 4th May 2010, 10:24
  4. Drag and Drop
    By chris_helloworld in forum Qt Programming
    Replies: 2
    Last Post: 31st March 2010, 09:03
  5. whole row drag/drop
    By gyre in forum Newbie
    Replies: 13
    Last Post: 27th November 2007, 08:56

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.