Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    How to use Drag'n drop?

    General and Desktop
    2
    4
    809
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      Jack_Bauer last edited by

      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

      1 Reply Last reply Reply Quote 0
      • dheerendra
        dheerendra Qt Champions 2022 last edited by

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

        Dheerendra
        @Community Service
        Certified Qt Specialist
        http://www.pthinks.com

        1 Reply Last reply Reply Quote 0
        • J
          Jack_Bauer last edited by

          [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".

          1 Reply Last reply Reply Quote 0
          • dheerendra
            dheerendra Qt Champions 2022 last edited by

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

            Dheerendra
            @Community Service
            Certified Qt Specialist
            http://www.pthinks.com

            1 Reply Last reply Reply Quote 0
            • First post
              Last post