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

Qt creates Native widgets for the widgets that are touch enabled even if Qt::AA_DontCreateNativeWidgetSiblings is set at application level

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Moved
    • Icon: P1: Critical P1: Critical
    • 4.7.2
    • 4.6.2
    • None
    • Win 7 64 bit, Qt 4.6.2, Qt Creator 2.1

      I found this issue when I was trying to run the Multitouch Dials example which ships with Qt SDK.
      I found that I can rotate multiple knobs simultaneously only once. Once any of the dial is touched/mousepressed Qt creates native window for that. Each knob's is set to accept touch event. Also QCoreApplication::setAttribute(Qt::AA_DontCreateNativeWidgetSiblings) is done at application level.

      After delving into Qt code I found that in QWidget::winId(), it does setAttribute(Qt::WA_NativeWindow) even if the Qt::AA_DontCreateNativeWidgetSiblings attribute is set for the application.
      I have tested that this issue is fixed if I put check
      if(QCoreApplication::testAttribute(Qt::AA_DontCreateNativeWidgetSiblings)==false)
      before that->setAttribute(Qt::WA_NativeWindow); is called in QWidget::winId(). I am not sure if this is correct fix but it works for me.

      Thanks

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

            dzyubenk Denis Dzyubenko (Inactive)
            dpatel Devendra Patel
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes