Hi, do anyone know if is possible ( I have 2 widgetGL) drag a .jpg show in wid1 onto wid2?? I'd like see this .jpg moving between two widget while I dragging.....thanks
Hi, do anyone know if is possible ( I have 2 widgetGL) drag a .jpg show in wid1 onto wid2?? I'd like see this .jpg moving between two widget while I dragging.....thanks
Regards
Yes, it's possible.
Use QDragObject::setPixmap() to set the drag indicator (your jpeg image) but use QImageDrag instead of QDragObject so that you can use setImage() to set your jpeg image as contents of the drag. Remember to set widgets to accept drops and reimplement proper events (mouse press and mouse move) to start the drag. See docs of d&d for details.
Bookmarks