Drap and Drop pixmap support?

  • I am trying to use Qt5.2's external drag and drop feature, but looks like it is incomplete as i can not find a way to attach pixmap during external drag and drop?

    I quick look @ http://code.woboq.org/qt5/qtdeclarative/src/quick/items/qquickdrag.cpp.html#724
    indicates a work in progress? Any idea when it will be available? Or a workaround till that time?

  • no one is working on dnd?

  • Hey,

    whats your purpose for the drag and drop? You can use the Drag of the MouseArea. If you want to drop it to fixed positions, you'll have to write your own function(s) for that.
    I found an example in the documentation: "Drag and Drop":http://qt-project.org/doc/qt-5.0/qtquick/draganddrop.html

  • My purpose is to set the QDrag's pixmap so that when i am doing an external drag i see a snapshot of the item i am moving.

    I would also like to know can i use drag and Item first as Internal drag and as soon as I detect MouseArea::mouseX is outside the some rect then I switch to External drag. Basically i want something like below:-

    • Mouse-pressed
    • Mouse-Moved
      ------Start internal drag
      ----------Mouse move event
      -------------Check if mouse position is out of rect,
      -----------------Yes it is outside rect start External drag
      -----------------------------If in the same window cancel External Drag and Start Internal Drag else continue.

    Basically i want to have external as well as internal drag inside the same drag sequence? Please let me know if it is possible?

Log in to reply

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