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
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.
Bookmarks