How to use Drag'n drop?



  • Hello,

    first i have to tell you, that i'm from germany so my english may contain some errors.

    After days of using search engines to find out how to use the drag and drop events, i hope you can help me.
    The problem is, that I want to enable to move a frame using the cursor.

    My idea was to use drag and drop, but I don't rlly understand this drag'n drop events.

    I don't want ready solutions, but I hope, there's someone who could explain me the concept of using drag'n drop for this purpose and in the best case with posting an example.

    Thanks in advance,

    Jack_Bauer, CTU



  • Did you get a chance to look at Drag and Drop Examples given in the Qt Assistant ?



  • [quote author="Dheerendra" date="1410195597"]Did you get a chance to look at Drag and Drop Examples given in the Qt Assistant ?[/quote]

    Yes, I did, but the examples are without a good explanation and the documentation in the web didn't help me.

    If I do this snippet into my mainwindow.h:

    @protected:
    void dragEnterEvent(QDragEnterEvent *event);
    void dropEvent(QDropEvent *event);@

    I will get three errors:
    !http://img5.fotos-hochladen.net/uploads/gg1t5uv02syl.png(bla)!

    It could be translated in english with "unresolved external symbol".



  • It means that you have not implemented these functions in your MainWindow.cpp. Implement these functions in your class.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.