您尚未登录。

#1 2022-12-25 14:45:25

Cpointerz
会员
注册时间: 2021-05-19
帖子: 3

Qt-Creator无法使用fcitx5输入中文

RT,
firefox,Clion,VSC均可使用fcitx5

fcitx5-diagnose输出内容
'''
$  fcitx5-diagnose
# System Info:
1.  `uname -a`:

        Linux shirasawa-b550maoruselite 6.1.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 21 Dec 2022 22:27:55 +0000 x86_64 GNU/Linux

2.  `lsb_release`:

    `lsb_release` not found.

3.  `/etc/lsb-release`:

    `/etc/lsb-release` not found.

4.  `/etc/os-release`:

        NAME="Arch Linux"
        PRETTY_NAME="Arch Linux"
        ID=arch
        BUILD_ID=rolling
        ANSI_COLOR="38;2;23;147;209"
        HOME_URL="https://archlinux.org/"
        DOCUMENTATION_URL="https://wiki.archlinux.org/"
        SUPPORT_URL="https://bbs.archlinux.org/"
        BUG_REPORT_URL="https://bugs.archlinux.org/"
        PRIVACY_POLICY_URL="https://terms.archlinux.org/docs/privacy-policy/"
        LOGO=archlinux-logo

5.  Desktop Environment:

    Desktop environment is `kde`.

6.  XDG SESSION TYPE:

        XDG_SESSION_TYPE='x11'

7.  Bash Version:

        BASH_VERSION='5.1.16(1)-release'

# Environment:
1.  DISPLAY:

        DISPLAY=':0'


        WAYLAND_DISPLAY=''

2.  Keyboard Layout:

    1.  `setxkbmap`:

            xkb_keymap {
                xkb_keycodes  { include "evdev+aliases(qwerty)" };
                xkb_types     { include "complete"      };
                xkb_compat    { include "complete"      };
                xkb_symbols   { include "pc+cn+inet(evdev)"     };
                xkb_geometry  { include "pc(pc105)"     };
            };

    2.  `xprop`:

            _XKB_RULES_NAMES(STRING) = "evdev", "pc105", "cn", "", ""

3.  Locale:

    1.  All locales:

            C
            C.UTF-8
            en_US.utf8
            POSIX
            zh_CN.utf8

    2.  Current locale:

            LANG=zh_CN.UTF-8
            LC_CTYPE="zh_CN.UTF-8"
            LC_NUMERIC=zh_CN.UTF-8
            LC_TIME=zh_CN.UTF-8
            LC_COLLATE="zh_CN.UTF-8"
            LC_MONETARY=zh_CN.UTF-8
            LC_MESSAGES="zh_CN.UTF-8"
            LC_PAPER=zh_CN.UTF-8
            LC_NAME=zh_CN.UTF-8
            LC_ADDRESS=zh_CN.UTF-8
            LC_TELEPHONE=zh_CN.UTF-8
            LC_MEASUREMENT=zh_CN.UTF-8
            LC_IDENTIFICATION=zh_CN.UTF-8
            LC_ALL=

4.  Directories:

    1.  Home:

            /home/shirasawa

    2.  `${XDG_CONFIG_HOME}`:

        Environment variable `XDG_CONFIG_HOME` is not set.

        Current value of `XDG_CONFIG_HOME` is `~/.config` (`/home/shirasawa/.config`).

    3.  Fcitx5 Settings Directory:

        Current fcitx5 settings directory is `~/.config/fcitx5` (`/home/shirasawa/.config/fcitx5`).

5.  Current user:

    The script is run as shirasawa (1000).

# Fcitx State:
1.  executable:

    Found fcitx5 at `/usr/bin/fcitx5`.

2.  version:

    Fcitx version: `5.0.21`

3.  process:

    Found 1 fcitx5 process:

           1102 fcitx5

4.  `fcitx5-remote`:

    `fcitx5-remote` works properly.

5.  DBus interface:

    Using `dbus-send` to check dbus.

    Owner of DBus name `org.fcitx.Fcitx5` is `:1.56`.

    PID of DBus name `org.fcitx.Fcitx5` owner is `1102`.

    Debug information from dbus:

           Group [x11::0] has 8 InputContext(s)
          IC [1a6561fc12704231bd45cd46739d0bdf] program:konsole frontend:dbus cap:6000800072 focus:1
          IC [2c74b0cb3c5444738513f00e7e04b55b] program:plasmashell frontend:dbus cap:16000800072 focus:0
          IC [65c1074e2da34d5cbb3945052f5f3ff2] program:firefox frontend:dbus cap:6000000012 focus:0
          IC [9e4f53ffb2a848c48071240db842b6a8] program:firefox frontend:dbus cap:6000000012 focus:0
          IC [680702608ae64d8bab44ec28b23c831f] program:konsole frontend:dbus cap:16000800072 focus:0
          IC [3ad1207cb1d94c858341d4549f6c5383] program:plasmashell frontend:dbus cap:16000800072 focus:0
          IC [d09f3138d2774cfba28e8a3194b5f93b] program:firefox frontend:dbus cap:6000000012 focus:0
          IC [7f6b1625ee9e4a7f95ae53f20f2386b5] program:firefox frontend:dbus cap:6000000052 focus:0
        Input Context without group

# Fcitx Configure UI:
1.  Config Tool Wrapper:

    Found fcitx5-configtool at `/usr/bin/fcitx5-configtool`.

2.  Config GUI for qt:

    Found `fcitx5-config-qt` at `/usr/bin/fcitx5-config-qt`.

3.  Config GUI for kde:

    Found fcitx5 kcm module.

        kcm_fcitx5                     - Configure Input Method

# Frontends setup:
## Xim:
1.  `${XMODIFIERS}`:

    Environment variable XMODIFIERS is set to "@im=fcitx" correctly.
    Xim Server Name from Environment variable is fcitx.

2.  XIM_SERVERS on root window:

    Xim server name is the same with that set in the environment variable.

## Qt:
1.  qt4 - `${QT4_IM_MODULE}`:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

2.  qt5 - `${QT_IM_MODULE}`:

    Environment variable QT_IM_MODULE is set to "fcitx" correctly.

3.  Qt IM module files:

    Found fcitx5 im module for qt: `/usr/lib/qt/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`.
    Found unknown fcitx qt module: `/usr/lib/qt/plugins/kcms/kcm_fcitx5.so`.
    Found fcitx5 qt5 module: `/usr/lib/fcitx5/qt5/libfcitx-quickphrase-editor5.so`.
    Found unknown fcitx qt module: `/usr/lib/office6/qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so`.
    Found fcitx5 im module for qt6: `/usr/lib/qt6/plugins/platforminputcontexts/libfcitx5platforminputcontextplugin.so`.

    Following error may not be accurate because guessing Qt version from path depends on how your distribution packages Qt. It is not a critical error if you do not use any Qt application with certain version of Qt or you are using text-input support by Qt under Wayland.
    **Cannot find fcitx5 input method module for Qt4.**

## Gtk:
1.  gtk - `${GTK_IM_MODULE}`:

    Environment variable GTK_IM_MODULE is set to "fcitx" correctly.

2.  `gtk-query-immodules`:

    1.  gtk 2:

        Found `gtk-query-immodules` for gtk `2.24.33` at `/usr/bin/gtk-query-immodules-2.0`.
        Version Line:

            # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33

        Found fcitx5 im modules for gtk `2.24.33`.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so"
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"

    2.  gtk 3:

        Found `gtk-query-immodules` for gtk `3.24.36` at `/usr/bin/gtk-query-immodules-3.0`.
        Version Line:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.36

        Found fcitx5 im modules for gtk `3.24.36`.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so"
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"

3.  Gtk IM module cache:

    1.  gtk 2:

        Found immodules cache for gtk `2.24.33` at `/usr/lib/gtk-2.0/2.10.0/immodules.cache`.
        Version Line:

            # Created by /usr/bin/gtk-query-immodules-2.0 from gtk+-2.24.33

        Found fcitx5 im modules for gtk `2.24.33`.

            "/usr/lib/gtk-2.0/2.10.0/immodules/im-fcitx5.so"
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"

    2.  gtk 3:

        Found immodules cache for gtk `3.24.36` at `/usr/lib/gtk-3.0/3.0.0/immodules.cache`.
        Version Line:

            # Created by /usr/bin/gtk-query-immodules-3.0 from gtk+-3.24.36

        Found fcitx5 im modules for gtk `3.24.36`.

            "/usr/lib/gtk-3.0/3.0.0/immodules/im-fcitx5.so"
            "fcitx" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"
            "fcitx5" "Fcitx5 (Flexible Input Method Framework5)" "fcitx5" "/usr/locale" "ja:ko:zh:*"

    3.  gtk 4:

        **Cannot find immodules cache for gtk 4**

        **Cannot find fcitx5 im module for gtk 4 in cache.**

4.  Gtk IM module files:

    1.  gtk 2:

        All found Gtk 2 immodule files exist.

    2.  gtk 3:

        All found Gtk 3 immodule files exist.

    3.  gtk 4:

        All found Gtk 4 immodule files exist.

# Configuration:
## Fcitx Addons:
1.  Addon Config Dir:

    Found fcitx5 addon config directory: `/usr/share/fcitx5/addon`.

2.  Addon List:

    1.  Found 31 enabled addons:

            Anthy 5.0.13
            Bamboo Wrapper For Fcitx 1.0.2
            Chewing 5.0.13
            Simplified and Traditional Chinese Translation 5.0.16
            Classic User Interface 5.0.21
            Clipboard 5.0.21
            Cloud Pinyin 5.0.16
            DBus 5.0.21
            DBus Frontend 5.0.21
            Emoji 5.0.21
            Fcitx4 Frontend 5.0.21
            Full width character 5.0.16
            IBus Frontend 5.0.21
            Lua IME API 5.0.10
            Input method selector 5.0.21
            Keyboard 5.0.21
            KDE Input Method Panel 5.0.21
            Lua Addon Loader 5.0.10
            Status Notifier 5.0.21
            Notification 5.0.21
            Pinyin 5.0.16
            Extra Pinyin functionality 5.0.16
            Punctuation 5.0.16
            Quick Phrase 5.0.21
            Spell 5.0.21
            Table 5.0.16
            Unicode 5.0.21
            Wayland 5.0.21
            Wayland Input method frontend 5.0.21
            XCB 5.0.21
            X Input Method Frontend 5.0.21

    2.  Found 0 disabled addons:

3.  Addon Libraries:

    All libraries for all addons are found.

4.  User Interface:

    Found 2 enabled user interface addons:

        Classic User Interface
        KDE Input Method Panel

## Input Methods:
1.  `/home/shirasawa/.config/fcitx5/profile`:

        [Groups/0]
        # Group Name
        Name=默认        # Layout
        Default Layout=cn
        # Default Input Method
        DefaultIM=pinyin

        [Groups/0/Items/0]
        # Name
        Name=keyboard-cn
        # Layout
        Layout=

        [Groups/0/Items/1]
        # Name
        Name=pinyin
        # Layout
        Layout=

        [Groups/0/Items/2]
        # Name
        Name=keyboard-us
        # Layout
        Layout=

        [GroupOrder]
        0=默认
# Log:
1.  `date`:

        2022年 12月 25日 星期日 14:41:09 CST

2.  `/home/shirasawa/.config/fcitx5/crash.log`:

    `/home/shirasawa/.config/fcitx5/crash.log` not found.

**Warning: the output of fcitx5-diagnose contains sensitive information, including the distribution name, kernel version, name of currently running programs, etc.**

**Though such information can be helpful to developers for diagnostic purpose, please double check and remove as necessary before posting it online publicly.**

'''

离线

#2 2022-12-26 09:39:05

matrikslee
会员
注册时间: 2017-04-21
帖子: 450
个人网站

Re: Qt-Creator无法使用fcitx5输入中文

Following error may not be accurate because guessing Qt version from path depends on how your distribution packages Qt. It is not a critical error if you do not use any Qt application with certain version of Qt or you are using text-input support by Qt under Wayland.
    **Cannot find fcitx5 input method module for Qt4.**

大概率是因为qt4的包缺失了,检查你的系统是否安装了fcitx5-qt (或者是拆分的fcitx5-qt-git

离线

#3 2022-12-26 16:28:36

luxni
会员
注册时间: 2014-06-08
帖子: 281

Re: Qt-Creator无法使用fcitx5输入中文

我的qt creator是可以输入中文,对比了下fcitx5 config, 基本一样,要不看下qt creator这边。


虽然人菜菜的,但也想做个有趣的人。

离线

页脚