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

[REG 5.15.2->6.3.1/6.4.0 Beta2] You can still insert Chinese text into a QTextEdit when "readOnly" property is enabled.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.5
    • 6.3.1, 6.4.0 Beta2
    • Widgets: Main Window
    • None
    • Windows Version: Win11 22H2, Qt Version: 6.3.1 MSVC 2019 64bit/6.4.0 MSVC 2019 64bit
    • Windows
    • 70096b2bb (dev), 24f6eaa11 (6.7), c535fcc59 (6.6)

    Description

      How to reproduce this bug:

      1.creates a Qt Widgets Application.

      2.Add a text edit to your main window, and set it "readOnly".

      3.Build this project (using Qt 6.3.1/6.4.0) and Run it.

      Or you can skip the three steps above, just launch attached example qtbugexample.zip(built on Qt6.3.1)

      4.Switch you IME to Chinese. (I'm using the default Chinese IME for Windows. For your convenience, you can see this video How to Use the Pinyin Keyboard on Windows 10 - Typing in Chinese - YouTube as a tutorial.)

      5.Randomly press some keys(a~z).

      Expected behavior:

      Because the text edit is set to "readOnly", the input method eiitor should not be activated at this time. (In Qt 5.15.2, it works exactly this way)

      Actual behavior:

      The IME is activated(as shown in attached image). After you press some keys, press "1"(The function is to select the first candidate word.).  The selected word will insert into text edit(as shown in the second image).

      Attachments

        1. actual_behavior_1.png
          actual_behavior_1.png
          18 kB
        2. actual_behavior_2.png
          actual_behavior_2.png
          20 kB
        3. qtbugexample.zip
          13.91 MB

        Issue Links

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

          Activity

            People

              richard Richard Moe Gustavsen
              zhmou zezhong zhang
              Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews