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.
-
@feiyuhuahuo Did you check at runtime that QTextBroweser is still in read-only mode? It does not look like it is...
-
@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 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. -
@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
-