[Development] QtQuick: Drag pixmap

Mark Gaiser markg85 at gmail.com
Wed Jan 22 19:42:24 CET 2014


On Wed, Jan 22, 2014 at 12:11 AM, Fabien Castan <fabcastan at gmail.com> wrote:
> Hi,
>
> Qt 5.2 adds the possibility to use drag&drop from/to external applications.
> To allows to drag an item from QML to an external application, we can't
> simply set a target item, because we want to see this item ouside of the qml
> window.
> In Qt, we could set a pixmap on drag events:
> http://qt-project.org/doc/qt-4.8/qdrag.html#setPixmap
>
> I don't see something like that in QtQuick (Qt 5.2):
> http://qt-project.org/doc/qt-5/qml-qtquick-drag.html
>
> Is there a solution to do such thing in pure QML?
>
> Regards,
> Fabien

While browsing through the code (qquickdrag.cpp) i found these two
commented lines:
    // TODO: how to handle drag image?
    // drag->setPixmap(iconPixmap);

Along with that no more function for "setPixmap" that is exposed to QML.
That makes me fear that the setPixmap property is not there anymore.

Odd, since it would be an API break which i can't really imagine from Qt.

I hope someone else more knowledgeable in this area can chime in?



More information about the Development mailing list