PDA

View Full Version : drag and drop pushbutton



ojt_jimac
6th May 2009, 02:50
good day! i'm having trouble creating a draggable button.. im using qt for only about 2 weeks..can somebody please help me? i'm using qt designer..

i know that this topic is already discussed so many times but i'm a newbie, i only understand it a bit.. can anyone provide me a sample code on how to do it and a simple explanation? pls? thanks in advance..

deng, philippines

ojt_jimac
6th May 2009, 03:06
i've tried to look at the draggable text example on the Qt Assistant but i'm kinda lost 'cause i'm using the Qt designer..

what i'm trying now is to modify the draggable text example to draggable buttons.. but still, my aim is to create a draggable button using the Qt designer..

wagmare
6th May 2009, 06:54
for draggable text .. learn QGraphicsView(), QGraphicsScene() and QGraphicsTextItem () and how to design this three ... in QGraphicsScene u can drag that text item anywhere freely by just setting the flag
graphicsItem ->setFlag(QGraphicsItem::ItemIsMovable); ..