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

Child widgets don't inherit their parent's input contexts

    XMLWordPrintable

Details

    Description

      The documentation for QWidget::inputContext() states that by default the context is inherited from the widget's parent, in reality if no input context has been set on the widget the context is inherited from QApplication even if a context has been set on a parent item. So in the following snippet child.inputContext() will return qApp->inputContext() not parent.inputContext().

      QWidget parent;
      parent.setInputContext(new InputContext);

      QWidget child(&parent);
      child.setAttribute(Qt::WA_InputMethodEnabled, true);

      This is an issue with setting an input context on a QGraphicsView for example because the widget returned by QGraphicsSceneEvent is the view's viewport not the view itself.

      Attachments

        Issue Links

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

          Activity

            People

              denexter Andrew den Exter (closed Nokia identity) (Inactive)
              denexter Andrew den Exter (closed Nokia identity) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes