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

QGLWidget resets DisablePressAndHold - Behaviour

    XMLWordPrintable

Details

    Description

      Set Windows MICROSOFT_TABLETPENSERVICE_PROPERTY to parent window. It enables/disables PressAndHold feature on touch screen. It should affect naturally to all children widgets in the window. It works fine when using only QWidgets.

      But when there's QGLWidget in the widgets object tree (no need to be top or bottom) it causes that property is set only to the parent widget and not to any other widgets in the object tree.

      Attached example shows if we disable touch PressAndHold from the dialog it disables it only from the dialog area but not other widgets (button + glwidget) inside the dialog.

      To reproduce the issue use touch enabled screen
      1. Compile and start attached touchtest2 application
      2. Set the CheckBox: "DisablePressAndHold"
      3. To see correct behavior hold "New Dialog" and then Button "Click me" in the created Dialog
      => normal PressAndHold circle is not appearing so property is set correctly.
      4. Open the the GL-Widget -Dialog.
      5. Press and hold "GL Dlg Button" or GLWidget area
      => You can see that PressAndHold circle appears which means property is not set. You can try same to dialog frame area and it doesn't show the circle.

      Workaround is to loop all children widgets and set property to each widget in the object tree.

      In the attached application code this fixes the issue:

      MainWindow.cpp
      void MainWindow::glWidgetDlg_clicked()
      {
      ...
        GtHelper::setPressAndHold(m_glDlg, b);
        foreach(QObject* c, m_glDlg->children()) {
          if(c->isWidgetType())
            GtHelper::setPressAndHold(qobject_cast<QWidget*>(c), b);
        }
      }
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes