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

Input method widget is closed on destructing a widget

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.12.11, 6.1.0
    • 5.12.6, 5.15.0, 6.0.0
    • QPA
    • None
    • macOS
    • 7d5ba1c17ecbb620731ff7322fd278c3ce496dad (qt/qtbase/dev) a778580339427d745260db962e6f109739c5661f (qt/qtbase/5.12) ca979fd84461c1ec4bf232d6c4684261a9d55d4f (qt/qtbase/5.15)

    Description

      When composing text using an input method (I used "Pinyin - Simplified"), the input method session gets cancelled whenever a widget in the same window gets destructed.

      In our application, updates from another thread are send to the main thread and cause some widgets to be created/destructed. When such an update happens while the input method widget is visible, it closes the input method widget.

      In attachment I added a minimal example. To mimic updates which destruct widgets, I create a new QLabel and call deleteLater() every second. As you will notice it is impossible to compose text using the input method this way.

      This is a regression (in Qt 5.6.0 this didn't happen). I think it got introduced by https://codereview.qt-project.org/c/qt/qtbase/+/203859. The intention here was to cancel a composition session when the focus changes, but in my example the focus doesn't change and still this code is triggered.

      Attachments

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

        Activity

          People

            vestbo Tor Arne Vestbø
            dbutijn David Butijn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes