Text still can be input to QtextBrowser in readOnly mode by Chinese input method
-
wrote on 13 Dec 2022, 09:27 last edited by
-
I already set
readOnly
for atextBrowser
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.
@feiyuhuahuo Did you check at runtime that QTextBroweser is still in read-only mode? It does not look like it is...
-
@feiyuhuahuo Did you check at runtime that QTextBroweser is still in read-only mode? It does not look like it is...
wrote on 14 Dec 2022, 02:06 last edited by@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.
-
@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.
@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?
-
@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?
wrote on 15 Dec 2022, 06:05 last edited by feiyuhuahuo@jsulm
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. -
@jsulm
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.@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).
-
@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).
wrote on 16 Dec 2022, 02:01 last edited by@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. -
@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.@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
-
wrote on 1 Feb 2023, 05:18 last edited by
I can reproduce this.
I dont know whether just happen in Chinese language env. -
wrote on 1 Feb 2023, 10:59 last edited by