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

QApplication cannot catch QEvent::TabletLeaveProximity starting from Qt5.6

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.9.3
    • 5.6.0
    • None
    • Tested on Windows 7 and Windows 10 with two different Wacom tablets. Compilers: msvc2010 (Qt5.4), msvc2013 (Qt5.5), msvc2015 (Qt5.6) and minGW (Qt5.6).
    • 127483b5e30de6c1905ea3280dd45a0b7d6a3813

    Description

      When trying to detect event inside the event loop of `QApplication`, the `QEvent::TabletLeaveProxiity` cannot be detected in Qt5.6, but works fine with the previous versions (Qt5.4 and Qt5.5).

      This is the code example:

      QApplication class example that tried to catch tablet events
      class Application : public QApplication{
      public:
          Application(int& argv, char** argc)
              : QApplication(argv, argc)
          {}
      protected:
          bool event(QEvent* event)
          {
              if (event->type() == QEvent::TabletEnterProximity){
                  qDebug() << "Tablet enters proximity";
                  return true;
              }
              if (event->type() == QEvent::TabletLeaveProximity){
                  // this part is never entered in Qt5.6
                  qDebug() << "Tablet leaves proximity";
                  return true;
              }
              return QApplication::event(event);
          }
      };
      

      Attachments

        1. main.cpp
          0.7 kB
        2. wacom-bug.pro
          0.3 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            vicrucann Victoria Rudakova
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes