You are not checking for the obj receiving the event.
This should not be a problem, but see if you get at all events from your list:
Qt Code:
  1. bool MyDialog::eventFilter(QObject *obj, QEvent *event)
  2. {
  3. qDebug() << "Event Filter called with " << event->type();
  4. if(obj == ui->myList)
  5. {
  6. if (event->type() == QEvent::DragLeave) {
  7. qDebug() << event->type() << "= drag leave event.";
  8. return true;
  9. } else if (event->type() == QEvent::DragEnter) {
  10. qDebug() << event->type() << "= drag enter event.";
  11. return true;
  12. }
  13. }
  14. else {
  15. // standard event processing
  16. return QObject::eventFilter(obj, event);
  17. }
  18. }
To copy to clipboard, switch view to plain text mode