Can't input Chinese in QPlainTextEdit



  • I have a small text editor program using QTextEdit. When I
    changed to using QPlainTextEdit, it interpreted the keystrokes (in
    Chinese input mode) as normal latin1 characters!!! Can anyone help
    solving this problem. I am using Fedora29 and Qt5.


  • Lifetime Qt Champion

    Hi,

    What happens if you load a text containing chines characters in that widget ?



  • In almost aspects (display, find,...) QTextEdit and QPlainTextEdit
    behave the same in my simple editor. Except Chinese can't be keyed
    in if switched to using QPlainTextEdit.


  • Qt Champions 2018

    @wij2 which Qt version is that exactly?



  • [wij2@localhost]$ qmake-qt5 --version
    QMake version 3.1
    Using Qt version 5.11.3 in /usr/lib64


  • Lifetime Qt Champion

    Did you check the bug report system ?



  • I checked the indicated web page just now, nothing relevant (keyword=QPlainTextEdit)

    The following are messages dumped on the terminal, hope it could provide more hints: (Except the issue that Chinese can't be input in QPlainTextEdit, the other one is Segmentation fault after su)

    [wij2@localhost]$ env | grep SESSION
    XDG_SESSION_ID=2
    DESKTOP_SESSION=gnome
    XDG_SESSION_TYPE=wayland
    XDG_SESSION_DESKTOP=gnome
    GDMSESSION=gnome
    DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
    SESSION_MANAGER=local/unix:@/tmp/.ICE-unix/1596,unix/unix:/tmp/.ICE-unix/1596
    [wij2@localhost]$ ./simple_qed
    Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
    ^C
    bash: history: write error: Success
    [wij2@localhost]$ su
    Password:
    [root@localhost]# ./simple_qed
    Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
    Qt: Session management error: None of the authentication protocols specified are supported
    Segmentation fault
    [root@localhost]#


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.