void toListView::contentsMouseMoveEvent(QMouseEvent *e) { #if 0 if (e->state() == Qt::LeftButton && e->stateAfter() == Qt::LeftButton && LastMove.x() > 0 && LastMove != e->pos()) { QPoint p = e->pos(); int col = header()->sectionAt(p.x()); toTreeWidgetItem *item = itemAt(contentsToViewport(p)); toResultViewItem *resItem = dynamic_cast<toResultViewItem *>(item); toResultViewCheck *chkItem = dynamic_cast<toResultViewCheck *>(item); QString str; if (resItem) str = resItem->allText(col); else if (chkItem) str = chkItem->allText(col); else if (item) str = item->text(col); if (str.length()) { Q3DragObject *d = new Q3TextDrag(str, this); d->dragCopy(); } } else { LastMove = e->pos(); toTreeWidget::contentsMouseMoveEvent(e); } #endif }
void VendorLineEdit::mouseMoveEvent(QMouseEvent *) { if (_dragging) { Q3DragObject *drag = new Q3TextDrag(QString("vendid=%1").arg(_id), this); drag->dragCopy(); _dragging = FALSE; } }