Results 1 to 5 of 5

Thread: Customize Drag&Drop

  1. #1
    Join Date
    Sep 2010
    Posts
    14
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Customize Drag&Drop

    Hi,
    what Im looking for is more some pointing me to some material than exact solution for my problem.
    I need to create custom drag and drop efect in my app. Exactly what Im trying to do is that i use tab widget, where each tab is like matrix with some content. I need to drag something from one cell to another which can be on same or diferent tab.
    On drag put some custom info related to the place Im draging from to clipboard or somewhere, and on drop I need to use this info to load content to place Im dropping to. So like everything I need to do is like on drag save this info, on drop call this funcion and tel where are you droping.
    I searched for some closer info about altering drag and drop this way, but no luck till now. Can you give me some closer directions?

    I would apreciate any help.
    Thanks

  2. #2
    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: Customize Drag&Drop

    What exactly are you having problems with? This looks like a classical drag&drop situation between two line edits (or whatever else you use for representing matrices).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2010
    Posts
    14
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Customize Drag&Drop

    Hi thank you for your response,
    my problem is, I dont realy understand, how to change it to work it in my way. Like I have my model where is like vector or what ever where are 9 fields( Lets say 9 text strings). I need when i drag from cell, not to put content of cell in the memory, but one of the strings and when I drop, I dont want to put this string to where Im droping, I need to call my own methode on that cell.

  4. #4
    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: Customize Drag&Drop

    What exactly do you mean by "change it"? You handle drops by reimplementing dropEvent(), like in the examples.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Sep 2010
    Posts
    14
    Thanks
    3
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Customize Drag&Drop

    Thank you for your efforts, but I was out of net for some time and in the mean time I figured out how to solve it. Still, I realy apreciate your help.

    Thank you

Similar Threads

  1. Customize drop indicator in QTreeView
    By novakk in forum Qt Programming
    Replies: 2
    Last Post: 28th November 2010, 22:03
  2. Replies: 2
    Last Post: 13th October 2010, 22:51
  3. Replies: 3
    Last Post: 10th June 2010, 16:13
  4. Replies: 0
    Last Post: 4th May 2010, 11:24
  5. Drag and Drop
    By cwnelatury in forum Newbie
    Replies: 3
    Last Post: 29th April 2009, 01:51

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.