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
- 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.
It works for me in 10.7.
Are you sure you do type CJK punctuation, not Copy-Paste ?
please also attach your Qt version and installation way (via MacPorts or flink?).
[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
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]
Sorry, I misunderstood, I was simply pasting in the characters. Are you trying to use the "Unicode Hex Input" method? I was unable to get that to work.
See the detail in following picture
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.