Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-66418

Event filters do not receive events anymore

    XMLWordPrintable

Details

    • WinRT
    • ab03ee7b7e12ae64556513e4791b0d4d55ea26c4 29208fa07c1b9f656ea2535696828385b7832226

    Description

      Since Qt 5.10.1 and later WinRT event filters do not receive events anymore:

      class EventHandler : public QObject
      {
          Q_OBJECT
      public:
          bool eventFilter(QObject *obj, QEvent *event) override {
      		qDebug() << "Received event " << event->type();
      		return false;
      	}
      }
      
      
      int main(int argc, char *argv[])
      {
          QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
      
          QGuiApplication app(argc, argv);
          QCoreApplication::instance()->installEventFilter(new EventHandler());
      
          return app.exec();
      }
      

      Also the following warning is printed:

      qt.winrtrunner.app: WARNING: QApplication was not created in the main() thread.
      

      In Qt 5.9 and 5.10 event filters work as expected.

      Attachments

        For Gerrit Dashboard: QTBUG-66418
        # Subject Branch Project Status CR V

        Activity

          People

            owolff Oliver Wolff
            DanielSt Peter Staab
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes