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
QtWS25 Last Chance

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 862 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.
  • feiyuhuahuoF Offline
    feiyuhuahuoF Offline
    feiyuhuahuo
    wrote on 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

    jsulmJ 1 Reply Last reply
    0
    • feiyuhuahuoF feiyuhuahuo

      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

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on 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

      feiyuhuahuoF 1 Reply Last reply
      1
      • jsulmJ jsulm

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

        feiyuhuahuoF Offline
        feiyuhuahuoF Offline
        feiyuhuahuo
        wrote on 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

        jsulmJ 1 Reply Last reply
        0
        • feiyuhuahuoF feiyuhuahuo

          @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

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on 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

          feiyuhuahuoF 1 Reply Last reply
          1
          • jsulmJ jsulm

            @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?

            feiyuhuahuoF Offline
            feiyuhuahuoF Offline
            feiyuhuahuo
            wrote on 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.

            jsulmJ 1 Reply Last reply
            0
            • feiyuhuahuoF feiyuhuahuo

              @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.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on 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

              feiyuhuahuoF 1 Reply Last reply
              0
              • jsulmJ jsulm

                @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).

                feiyuhuahuoF Offline
                feiyuhuahuoF Offline
                feiyuhuahuo
                wrote on 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.

                jsulmJ 1 Reply Last reply
                0
                • feiyuhuahuoF feiyuhuahuo

                  @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.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on 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 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 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