hi,
i had written an application in which i use drag and drop concept.in that use dragCopy for dragging the items. but i need move the item itself instead of copying. i tried using dragMove() function instead of dragCopy(). but i could not move the item. the following is my code:
{
public:
drag
(QWidget* parent
=0,
const char* name
=0);
protected:
};
drag
::drag(QWidget * parent,
const char * name
):{
}
{
QDragObject *drobj;
if ( pixmap() )
drobj = new QImageDrag( pixmap()->convertToImage(), this );
drobj->dragMove();
}
class drag : public QLabel
{
public:
drag(QWidget* parent=0, const char* name=0);
protected:
void mousePressEvent( QMouseEvent * );
};
drag::drag(QWidget * parent,const char * name):
QLabel(parent,name)
{
}
void drag::mousePressEvent( QMouseEvent * a )
{
QDragObject *drobj;
if ( pixmap() )
drobj = new QImageDrag( pixmap()->convertToImage(), this );
drobj->dragMove();
}
To copy to clipboard, switch view to plain text mode
is this correct ? if no means can anyone correct me ?
thanks in advance,
Bookmarks