Results 1 to 11 of 11

Thread: Question about drag & drop

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    59
    Thanked 1 Time in 1 Post

    Default Re: Question about drag & drop

    Quote Originally Posted by fatjuicymole View Post
    As Wysota has stated, once you have learnt how drag works manually, you will know exactly what you need to do. Qt designer isn't going to write the code for you.
    Hi,
    I don't want designer write the code for me, I only would know where add the code I have to add, nothing more
    Franco Amato

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 268 Times in 268 Posts
    Wiki edits
    20

    Default Re: Question about drag & drop

    I assume you use Qt Creator here:
    If you have created a designer widget with classes, you'll have a .cpp and a .h file (next to a .ui file) which you can use to add features.
    Just click the header or source file to edit them and handle the drag and drop. You can install some event filters so you don't have to subclass your dialog or widget.

  3. #3
    Join Date
    Nov 2007
    Location
    Italy
    Posts
    694
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    59
    Thanked 1 Time in 1 Post

    Default Re: Question about drag & drop

    Quote Originally Posted by tbscope View Post
    I assume you use Qt Creator here:
    If you have created a designer widget with classes, you'll have a .cpp and a .h file (next to a .ui file) which you can use to add features.
    Just click the header or source file to edit them and handle the drag and drop. You can install some event filters so you don't have to subclass your dialog or widget.
    Hi,
    I'm not using Qt Creator. I'm using Visual Studio and Qt Designer for some dialogs.
    As I said before the dialog implementing the drag was not designed by me, but by another developer. He gave to me the .ui, the .h and .cpp and I added them to the visual studio project. The dialog successfully implement the drag but there is no QDrag::exec in the code so I don't understand how it can work.
    Can you clarify my doubts?
    Regards,
    Franco
    Franco Amato

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

    Default Re: Question about drag & drop

    You have been given all the help you need. In doubt go to http://qt.gitorious.org, Qt's source code is there. I'm sure you can find a couple of QDrag::exec() calls there. Find the one relevant to your case and rewrite the virtual method that calls it adding the changes you require.
    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.


Similar Threads

  1. Drag and Drop General Question
    By onurozcelik in forum Qt Programming
    Replies: 0
    Last Post: 19th August 2010, 14:22
  2. Replies: 0
    Last Post: 1st July 2010, 06:16
  3. Replies: 0
    Last Post: 4th May 2010, 10:24
  4. drag-drop question
    By zgulser in forum Qt Programming
    Replies: 13
    Last Post: 6th July 2009, 14:56
  5. Drag n Drop question
    By Ashitaka in forum Qt Programming
    Replies: 1
    Last Post: 1st December 2006, 07:21

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
  •  
Qt is a trademark of The Qt Company.