[Qt-interest] Setting "native" drag and drop pixmap?
Oliver.Knoll at comit.ch
Oliver.Knoll at comit.ch
Tue Feb 8 17:47:07 CET 2011
Hi,
I noticed that on Mac when I drag and drop a widget within Qt Designer I do get the "Mac drag icon" (this green bubble with the + inside).
However in my own application I only get this generic "black and white arrow" (can't remember the exact icon right now) when dragging e.g. a filepath or pixmap onto my main window.
I assume I could simply create my own QPixmap and set it with
http://doc.qt.nokia.com/latest/qdrag.html#setPixmap
but how does Qt Creator do it? Is there a "default/native drag'n'drop pixmap" API in Qt that I am overlooking, in analogy to
http://doc.qt.nokia.com/latest/qicon.html#fromTheme
?
Thanks, Oliver
p.s. Sorry my laziness here, but I don't have the Qt Creator code handy - and I did not find any pixmap resources inside the Qt Creator app bundle either (so if at all this "drag custom pixmap" is embedded inside the executable).
--
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22
More information about the Qt-interest-old
mailing list