Hi All,
I have an image in QLabel.I want to drag the image using mouse.Which class should I use for that?Can anyone please help me? Should I use QDrag ??
Hi All,
I have an image in QLabel.I want to drag the image using mouse.Which class should I use for that?Can anyone please help me? Should I use QDrag ??
Hi A9am,
if you are asking how to drag image in qml it will be as..may this example could help you
Rectangle { id: mainRect; width: 600; height: 200; color: "white" Image { id: pic; source: "face-smile.png" anchors.verticalCenter: parent.verticalCenter opacity: (600.0-pic.x) / 600; MouseArea { anchors.fill: parent drag.target: pic drag.axis: "XAxis" drag.minimumX: 0 drag.maximumX: mainRect.width-pic.width } } }
Thanks m.azeemanwar for your reply. But I am not using qml. I have one QLabel and I have set the pixmap.Can I drag that Image using mouse?
Hi,
Have a look at the Drag and Drop examples, especially at the Draggable Icons Example.
Hope this helps,
Wladek
One second is long, everything longer than two seconds is definitely too long.
Bookmarks