QDrag ( QWidget * dragSource ) |
|
|
~QDrag
()
|
Qt::DropAction
|
exec
( Qt::DropActions
supportedActions
= Qt::MoveAction )
|
Qt::DropAction
|
exec
( Qt::DropActions
supportedActions
, Qt::DropAction
defaultDropAction
)
|
QPoint
|
hotSpot
() const
|
QMimeData *
|
mimeData
() const
|
QPixmap
|
pixmap
() const
|
void
|
setDragCursor
( const QPixmap &
cursor
, Qt::DropAction
action
)
|
void
|
setHotSpot
( const QPoint &
hotspot
)
|
void
|
setMimeData
( QMimeData *
data
)
|
void
|
setPixmap
( const QPixmap &
pixmap
)
|
QWidget *
|
source
() const
|
QWidget *
|
target
() const
|
void
|
actionChanged
( Qt::DropAction
action
)
|
void
|
targetChanged
( QWidget *
newTarget
)
|
QDrag *drag = new QDrag(this);
QMimeData *mimeData = new QMimeData;
mimeData->setText(commentEdit->toPlainText());
drag->setMimeData(mimeData);
drag->setHotSpot(QPoint(drag->pixmap().width()/2,
drag->pixmap().height()));