examples/draganddrop/delayedencoding/sourcewidget.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   100 //![0]
   100 //![0]
   101 void SourceWidget::startDrag()
   101 void SourceWidget::startDrag()
   102 {
   102 {
   103     mimeData = new MimeData;
   103     mimeData = new MimeData;
   104 
   104 
   105     connect(mimeData, SIGNAL(dataRequested(const QString &)),
   105     connect(mimeData, SIGNAL(dataRequested(QString)),
   106             this, SLOT(createData(const QString &)), Qt::DirectConnection);
   106             this, SLOT(createData(QString)), Qt::DirectConnection);
   107 
   107 
   108     QDrag *drag = new QDrag(this);
   108     QDrag *drag = new QDrag(this);
   109     drag->setMimeData(mimeData);
   109     drag->setMimeData(mimeData);
   110     drag->setPixmap(QPixmap(":/images/drag.png"));
   110     drag->setPixmap(QPixmap(":/images/drag.png"));
   111 
   111