QLineEdit doesn’t accept CJK symbols or punctuation on Mac OS X
-
QLineEdit doesn't accept CJK punctuation that I type, is it a bug?
The CJK symbols or punctuation
http://en.wikipedia.org/wiki/Template:Unicode_chart_CJK_Symbols_and_Punctuationtest environment:
- Platform: Mac OS X 10.6
- Qt version: 4.7.4
Qt install via MacPorts
-
I'm not sure if it's a bug or not. But you should look into writing your own QValidator for your QLineEdit, which would accept Unicode strings.
-
Are you sure you do type CJK punctuation, not Copy-Paste ?
please also attach your Qt version and installation way (via MacPorts or flink?).
Thx
[quote author="Chris H" date="1323977205"]It works for me in 10.7.[/quote]
-
I'm test it in PySide (a python binding for Qt) in fact.
In latest stable PySide, it could display CJK punctuation, sth looks like
@qlineedit.setText("unicode punctuation")@
but it doesn't accept user typing.
[quote author="alban.lefebvre" date="1323970818"]I'm not sure if it's a bug or not. But you should look into writing your own QValidator for your QLineEdit, which would accept Unicode strings.[/quote]
-
See the detail in following picture
!http://paste.ubuntu.org.cn/i109210(demo)!
http://paste.ubuntu.org.cn/i109210
In the terminal, the former is English punctuation \u002C,
the later is CJK punctuation \uFF0C.I can type both former and later via "Edit -> Special Characters" in non-Qt application(such as Apple Terminal) on Mac OS X,
however, I can't type the later one \uFF0C in Qt application.