浏览代码

Ignore Drop events

Vincent Lang 7 年之前
父节点
当前提交
d352fb9c95
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/ui/EventFilter.cpp

+ 5 - 0
src/ui/EventFilter.cpp

@@ -152,6 +152,11 @@ bool EventFilter::eventFilter(QObject* watched, QEvent* event)
     if ((mouseEvent) && (mouseEvent->button() == Qt::RightButton))
       return true;
   }
+  else if (event->type() == QEvent::Drop)
+  {
+    // QtWebEngine would accept the drop and unload web-client.
+    return true;
+  }
 
   return QObject::eventFilter(watched, event);
 }