Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. Text still can be input to QtextBrowser in readOnly mode by Chinese input method
Forum Updated to NodeBB v4.3 + New Features

Text still can be input to QtextBrowser in readOnly mode by Chinese input method

Scheduled Pinned Locked Moved Solved Qt for Python
10 Posts 4 Posters 941 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    feiyuhuahuo
    wrote on 13 Dec 2022, 09:27 last edited by
    #1

    I already set readOnly for a textBrowser through Qt Designer. But I found no matter English words or Chinese characters, they can still be input into QtextBrowser by Chinese input method. If use English input method, nothing can be input into.
    8a7cb68b-8188-4f54-b35d-f9dffdcb72c8-image.png
    a190532a-3c8c-456d-bfa5-ad27e96f10c0-image.png

    J 1 Reply Last reply 13 Dec 2022, 09:29
    0
    • F feiyuhuahuo
      13 Dec 2022, 09:27

      I already set readOnly for a textBrowser through Qt Designer. But I found no matter English words or Chinese characters, they can still be input into QtextBrowser by Chinese input method. If use English input method, nothing can be input into.
      8a7cb68b-8188-4f54-b35d-f9dffdcb72c8-image.png
      a190532a-3c8c-456d-bfa5-ad27e96f10c0-image.png

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 13 Dec 2022, 09:29 last edited by
      #2

      @feiyuhuahuo Did you check at runtime that QTextBroweser is still in read-only mode? It does not look like it is...

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      F 1 Reply Last reply 14 Dec 2022, 02:06
      1
      • J jsulm
        13 Dec 2022, 09:29

        @feiyuhuahuo Did you check at runtime that QTextBroweser is still in read-only mode? It does not look like it is...

        F Offline
        F Offline
        feiyuhuahuo
        wrote on 14 Dec 2022, 02:06 last edited by
        #3

        @jsulm I checked. I put the check code just before and after the appending text code. It's realy in read-only mode. Besides, my Chinese input method is the default Chinese input method of WIN10.
        4c7addb5-58af-49be-8b0f-f4d1a5dfab5c-image.png

        J 1 Reply Last reply 14 Dec 2022, 07:18
        0
        • F feiyuhuahuo
          14 Dec 2022, 02:06

          @jsulm I checked. I put the check code just before and after the appending text code. It's realy in read-only mode. Besides, my Chinese input method is the default Chinese input method of WIN10.
          4c7addb5-58af-49be-8b0f-f4d1a5dfab5c-image.png

          J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 14 Dec 2022, 07:18 last edited by
          #4

          @feiyuhuahuo What you show now is that you're appending text via code - that will always work, even if QTextBrowser is in read-only mode. Read-only just means that the user cannot edit the text - is that the case?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          F 1 Reply Last reply 15 Dec 2022, 06:05
          1
          • J jsulm
            14 Dec 2022, 07:18

            @feiyuhuahuo What you show now is that you're appending text via code - that will always work, even if QTextBrowser is in read-only mode. Read-only just means that the user cannot edit the text - is that the case?

            F Offline
            F Offline
            feiyuhuahuo
            wrote on 15 Dec 2022, 06:05 last edited by feiyuhuahuo
            #5

            @jsulm 70491dc8-8905-4feb-9bbf-842bc492cb9f-image.png
            Not that case. You can see from this picture, 'apple' is appended via code but I can still input text via Chinese input method. If I switch to English input method, the word box will not appear.

            J 1 Reply Last reply 15 Dec 2022, 08:16
            0
            • F feiyuhuahuo
              15 Dec 2022, 06:05

              @jsulm 70491dc8-8905-4feb-9bbf-842bc492cb9f-image.png
              Not that case. You can see from this picture, 'apple' is appended via code but I can still input text via Chinese input method. If I switch to English input method, the word box will not appear.

              J Offline
              J Offline
              jsulm
              Lifetime Qt Champion
              wrote on 15 Dec 2022, 08:16 last edited by
              #6

              @feiyuhuahuo said in Text still can be input to QtextBrowser in readOnly mode by Chinese input method:

              If I switch to English input method, the word box will not appear.

              And can you then enter text directly via keyboard? Maybe this is an issue with Chinese input method. You can search in Qt bug tracker whether this is a known issue (https://bugreports.qt.io/secure/Dashboard.jspa).

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              F 1 Reply Last reply 16 Dec 2022, 02:01
              0
              • J jsulm
                15 Dec 2022, 08:16

                @feiyuhuahuo said in Text still can be input to QtextBrowser in readOnly mode by Chinese input method:

                If I switch to English input method, the word box will not appear.

                And can you then enter text directly via keyboard? Maybe this is an issue with Chinese input method. You can search in Qt bug tracker whether this is a known issue (https://bugreports.qt.io/secure/Dashboard.jspa).

                F Offline
                F Offline
                feiyuhuahuo
                wrote on 16 Dec 2022, 02:01 last edited by
                #7

                @jsulm enter text directly via keyboard means I should switch to English input method. And if so, I can not enter text. Besides, I found not only QtextBrowser, but also QlineEdit and QTextEdit have the same problem. I searched in Qt bug tracker, and I did not find any related issues.

                J 1 Reply Last reply 16 Dec 2022, 06:20
                0
                • F feiyuhuahuo
                  16 Dec 2022, 02:01

                  @jsulm enter text directly via keyboard means I should switch to English input method. And if so, I can not enter text. Besides, I found not only QtextBrowser, but also QlineEdit and QTextEdit have the same problem. I searched in Qt bug tracker, and I did not find any related issues.

                  J Offline
                  J Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 16 Dec 2022, 06:20 last edited by
                  #8

                  @feiyuhuahuo said in Text still can be input to QtextBrowser in readOnly mode by Chinese input method:

                  I searched in Qt bug tracker, and I did not find any related issues

                  You can file a bug there

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • O Offline
                    O Offline
                    onebinary
                    wrote on 1 Feb 2023, 05:18 last edited by
                    #9

                    I can reproduce this.
                    I dont know whether just happen in Chinese language env.

                    1 Reply Last reply
                    0
                    • F Offline
                      F Offline
                      friedemannkleint
                      wrote on 1 Feb 2023, 10:59 last edited by
                      #10

                      https://bugreports.qt.io/browse/QTBUG-110838

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved