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

QPlainTextEdit Input Method does not work on first set readOnly to false

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 5.12.0 Beta 1
    • 4.6.0, 4.6.1, 4.6.2, 4.6.3, 4.7.0, 4.7.1, 4.7.2, 4.7.3, 4.7.4, 4.8.0, 4.8.1, 4.8.2, 4.8.3, 4.8.4, 5.0.0 Beta 1, 5.0.0 Beta 2, 5.0.0 RC 1, 5.0.0 RC 2, 5.0.0, 5.0.1
    • None
    • Linux x86_64 Ubuntu, SLES 11 SP2, etc.
    • 47bbc6d6f6bd7587e88b5b8bda79f848bb988b32

    Description

      Using SCIM and/or SCIM-ANTHY, the text input message does not work after you set a QPlainTextEdit.setReadOnly( false ), you can not right click and change Input Method.
      The attribute Qt::WA_InputMethodEnabled of QPlainTextEdit is false, when you do a second setReadOnly( false ) then Qt::WA_InputMethodEnabled is switched to true and Input Method works again.

      It happens since Qt 4.6.x, there is a new method in the source code called shouldEnableInputMethod, which just sets to InputMethod to true if ReadOnly is false, seems to be okay. But for example the order differs from QTextEdit.

      see:
      http://qt.gitorious.org/qt/qt/blobs/HEAD/src/gui/widgets/qplaintextedit.cpp#line2422
      and
      http://qt.gitorious.org/qt/qt/blobs/HEAD/src/gui/widgets/qtextedit.cpp#line2085

      In QPlainTextEdit:
      setAttribute(Qt::WA_InputMethodEnabled, shouldEnableInputMethod(this));
      d->control->setTextInteractionFlags(flags);

      In QTextEdit:
      d->control->setTextInteractionFlags(flags);
      setAttribute(Qt::WA_InputMethodEnabled, shouldEnableInputMethod(this));

      The order seems to be the difference.

      Attachments

        Issue Links

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

          Activity

            People

              esabraha Eskil Abrahamsen Blomfeldt
              jan.pilz Jan Pilz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes