--- a/src/qtgui/ssearch_w.cpp
+++ b/src/qtgui/ssearch_w.cpp
@@ -32,6 +32,7 @@
#include <qevent.h>
#include <QTimer>
#include <QCompleter>
+#include <QAbstractItemView>
#include "log.h"
#include "guiutils.h"
@@ -709,7 +710,7 @@
LOGDEB2("SSearch::eventFilter: target " << (target) << " (" << (queryText->lineEdit()) << ") type " << (eventTypeToStr(event->type())) << "\n" );
#endif
- if (target == queryText->view()) {
+ if (target == (QObject*)(queryText->view())) {
if (event->type() == QEvent::Hide) {
// List was closed. If we were displaying completions, need
// to reset state.