Text still can be input to QtextBrowser in readOnly mode by Chinese input method
-
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.
-
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...
@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?
@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).
@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
-