Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Drag object from one component to another
QtWS25 Last Chance

Drag object from one component to another

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 2.5k Views
  • 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.
  • Z Offline
    Z Offline
    Zmozie
    wrote on last edited by
    #1

    I'm building an application that should be able to drag dynamically loaded QML objects from a ListView to a rectangle, just like a regular GUI designer.
    I have successfully loaded the QML objects to a model and show them in a ListView.
    But I can't find out how to drag a new object of the clicked item in the ListView to the rectangle.

    Is this even possible with QML?

    1 Reply Last reply
    0
    • M Offline
      M Offline
      Merinas
      wrote on last edited by
      #2

      Is "that":http://doc.qt.nokia.com/4.7-snapshot/declarative-modelviews-package.html what you are looking for?

      1 Reply Last reply
      0
      • Z Offline
        Z Offline
        Zmozie
        wrote on last edited by
        #3

        That looks like a really good element.
        I'll try to use that.
        Is it possible to drag the delegate to a position instead of just clicking?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Merinas
          wrote on last edited by
          #4

          Maybe, another way is to change the parent property.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            Agroni
            wrote on last edited by
            #5

            I am really interested to see how dragging an element from one container to another is done.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved