您尚未登录。

#1 2019-08-24 11:24:30

Ruby
会员
注册时间: 2019-08-24
帖子: 4

在QtCreator 中fcitx无法中文输入,其他软件都能输入。

# 系统信息:
1.  `uname -a`:

        Linux archlinux 5.2.9-arch1-1-ARCH #1 SMP PREEMPT Fri Aug 16 11:29:43 UTC 2019 x86_64 GNU/Linux

2.  `lsb_release`:

    `lsb_release` 未找到.

3.  `/etc/lsb-release`:

    `/etc/lsb-release` 未找到.

4.  `/etc/os-release`:

        NAME="Arch Linux"
        PRETTY_NAME="Arch Linux"
        ID=arch
        BUILD_ID=rolling
        ANSI_COLOR="0;36"
        HOME_URL="https://www.archlinux.org/"
        DOCUMENTATION_URL="https://wiki.archlinux.org/"
        SUPPORT_URL="https://bbs.archlinux.org/"
        BUG_REPORT_URL="https://bugs.archlinux.org/"
        LOGO=archlinux

5.  桌面环境:

    桌面环境为 `kde`。

6.  Bash 版本:

        BASH_VERSION='5.0.7(1)-release'

# 环境:
1.  DISPLAY:

        DISPLAY=':0'

2.  键盘布局:

    1.  `setxkbmap`:

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

    2.  `xprop`:

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

3.  Locale:

    1.  全部可用 locale:

            C
            en_US.utf8
            POSIX
            zh_CN.utf8

    2.  当前 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=zh_CN.UTF-8

4.  目录:

    1.  主目录:

            /home/jankin

    2.  `${XDG_CONFIG_HOME}`:

        环境变量 `XDG_CONFIG_HOME` 没有设定。

        `XDG_CONFIG_HOME` 的当前值是 `~/.config` (`/home/jankin/.config`)。

    3.  Fcitx 设置目录:

        当前 fcitx 设置目录是 `~/.config/fcitx` (`/home/jankin/.config/fcitx`)。

5.  当前用户:

    脚本作为 jankin (1000) 运行。

# Fcitx 状态:
1.  可执行文件:

    在 `/usr/bin/fcitx` 找到了 fcitx.

2.  版本:

    Fcitx 版本: `4.2.9.7`

3.  进程:

    找到了 2 个 fcitx 进程:

         1093 fcitx
         1102 fcitx-dbus-watc

4.  `fcitx-remote`:

    `fcitx-remote` 工作正常.

5.  DBus 界面:

    使用 `dbus-send` 来检查 dbus。

    DBus 名称 `org.fcitx.Fcitx` 的所有者是 `:1.72`。

    DBus 名称 `org.fcitx.Fcitx` 的 PID 所有者是 `1093`。

# Fcitx 配置界面:
1.  配置工具封装:

    在 `/usr/bin/fcitx-configtool` 找到了 fcitx-configtool。

2.  用于 GTK+-2.0 的配置界面:

    **未找到 gtk2 的配置界面.**

3.  用于 GTK+-3.0 的配置界面:

    **未找到 gtk3 的配置界面.**

4.  KDE 的配置界面:

    **`kcmshell4` 未找到.**

    **无法找到一个图形界面的配置工具,请安装 `kcm-fcitx`,`fcitx-config-gtk2`,`fcitx-config-gtk3` 之一。**

# 前端设置:
## Xim:
1.  `${XMODIFIERS}`:

    环境变量 XMODIFIERS 已经正确地设为了 "@im=fcitx".
    XIM Server Name from Environment variable is fcitx.

2.  根窗口上的 XIM_SERVERS:

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

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

    环境变量 QT_IM_MODULE 已经正确地设为了 "fcitx".

2.  qt5 - `${QT_IM_MODULE}`:

    环境变量 QT_IM_MODULE 已经正确地设为了 "fcitx".

3.  Qt 输入法模块文件:

    找到了 fcitx 的 qt 模块: `/usr/lib/fcitx/qt/libfcitx-quickphrase-editor5.so`.
    找到了 Qt4 的输入法模块: `/usr/lib/qt4/plugins/inputmethods/qtim-fcitx.so`.
    找到了 Qt5 的输入法模块: `/usr/lib/qt/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.so`.
    找到了未知的 fcitx qt 模块: `/usr/lib/qt/plugins/kcm_fcitx.so`.

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

    环境变量 GTK_IM_MODULE 已经正确地设为了 "fcitx".

2.  `gtk-query-immodules`:

    1.  gtk 2:

        在 `/usr/bin/gtk-query-immodules-2.0` 找到了 gtk `2.24.32` 的 `gtk-query-immodules`.
        版本行:

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

        已找到 gtk `2.24.32` 的 fcitx 输入法模块.

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

    2.  gtk 3:

        在 `/usr/bin/gtk-query-immodules-3.0` 找到了 gtk `3.24.10` 的 `gtk-query-immodules`.
        版本行:

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

        已找到 gtk `3.24.10` 的 fcitx 输入法模块.

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

3.  Gtk 输入法模块缓存:

    1.  gtk 2:

        在 `/usr/lib/gtk-2.0/2.10.0/immodules.cache` 找到了 gtk `2.24.32` 的输入法模块缓存.
        版本行:

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

        已找到 gtk `2.24.32` 的 fcitx 输入法模块.

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

    2.  gtk 3:

        在 `/usr/lib/gtk-3.0/3.0.0/immodules.cache` 找到了 gtk `3.24.10` 的输入法模块缓存.
        版本行:

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

        已找到 gtk `3.24.10` 的 fcitx 输入法模块.

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

4.  Gtk 输入法模块文件:

    1.  gtk 2:

        找到的全部 Gtk 2 输入法模块文件均存在.

    2.  gtk 3:

        找到的全部 Gtk 3 输入法模块文件均存在.

# 配置:
## Fcitx 插件:
1.  插件配置文件目录:

    找到了 fcitx 插件配置目录: `/usr/share/fcitx/addon`.

2.  插件列表:

    1.  找到了 29 个已启用的插件:

            fcitx-autoeng
            fcitx-chttrans
            fcitx-classic-ui
            fcitx-clipboard
            fcitx-dbus
            fcitx-freedesktop-notify
            fcitx-fullwidth-char
            fcitx-imselector
            fcitx-ipc
            fcitx-ipcportal
            fcitx-keyboard
            fcitx-kimpanel-ui
            fcitx-lua
            fcitx-notificationitem
            fcitx-pinyin
            fcitx-pinyin-enhance
            fcitx-punc
            fcitx-quickphrase
            fcitx-qw
            fcitx-remote
            fcitx-spell
            fcitx-sunpinyin
            fcitx-table
            fcitx-unicode
            fcitx-vk
            fcitx-x11
            fcitx-xim
            fcitx-xkb
            fcitx-xkbdbus

    2.  找到了 0 个被禁用的插件:

3.  插件库:

    所有插件所需的库都被找到。

4.  用户界面:

    找到了 2 个已启用的用户界面插件:

        fcitx-classic-ui
        fcitx-kimpanel-ui

## 输入法:
1.  找到了 4 个启用的输入法:

        fcitx-keyboard-us
        sunpinyin
        bingchan
        shuangpin

2.  默认输入法:

    您已经正确的将一个键盘输入法 "fcitx-keyboard-us" 设为默认.

# 日志:
1.  `date`:

        2019年 08月 24日 星期六 11:19:09 CST

2.  `~/.config/fcitx/log/`:

        总用量 0

3.  `~/.config/fcitx/log/crash.log`:

    `~/.config/fcitx/log/crash.log` 未找到.

# .xprofile 文件内容
export XIM=fcitx
export XIM_PROGRAM=fcitx
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
[jankin@archlinux etc]$ cat profile



# profile 文件内容
# /etc/profile

# Set our umask
umask 022

# Append our default paths
appendpath () {
    case ":$PATH:" in
        *:"$1":*)
            ;;
        *)
            PATH="${PATH:+$PATH:}$1"
    esac
}

appendpath '/usr/local/sbin'
appendpath '/usr/local/bin'
appendpath '/usr/bin'
unset appendpath

export PATH

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
        for profile in /etc/profile.d/*.sh; do
                test -r "$profile" && . "$profile"
        done
        unset profile
fi

# Source global bash config
if test "$PS1" && test "$BASH" && test -z ${POSIXLY_CORRECT+x} && test -r /etc/bash.bashrc; then
        . /etc/bash.bashrc
fi

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH

export LC_CTYPE=zh_CN.UTF-8
export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx

这个问题我试图解决,但是没有得到结果。

离线

#2 2019-08-24 14:18:07

zplinux
会员
所在地: 江西省
注册时间: 2014-10-12
帖子: 187

Re: 在QtCreator 中fcitx无法中文输入,其他软件都能输入。

需要安装 gtk2/3, qt5 模块:

# pacman -S fcitx-gtk2 fcitx-gtk3 fcitx-qt5

Archlinux + DWM,喜欢 K.I.S.S 理念!

离线

#3 2019-08-24 15:06:54

Ruby
会员
注册时间: 2019-08-24
帖子: 4

Re: 在QtCreator 中fcitx无法中文输入,其他软件都能输入。

zplinux 说:

需要安装 gtk2/3, qt5 模块:

# pacman -S fcitx-gtk2 fcitx-gtk3 fcitx-qt5

我尝试去安装,似乎提示我安装过了
[jankin@archlinux bin]$ sudo pacman -S fcitx-gtk2 fcitx-gtk3 fcitx-qt5
warning: fcitx-qt5-1.2.3-9 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
:: fcitx-gtk2 and fcitx-lilydjwg-git are in conflict. Remove fcitx-lilydjwg-git? [y/N] y
error: failed to prepare transaction (could not satisfy dependencies)
:: unable to satisfy dependency 'fcitx>=4.2.9.6' required by fcitx-gtk2
:: unable to satisfy dependency 'fcitx>=4.2.9.6' required by fcitx-gtk3
:: unable to satisfy dependency 'fcitx' required by fcitx-qt5
:: removing fcitx-lilydjwg-git breaks dependency 'fcitx' required by fcitx-sunpinyin

然后我把它都卸载了
再进行安装,你所说的模块

[jankin@archlinux ~]$ pacman -Q | grep fcitx
fcitx 4.2.9.6-2
fcitx-gtk2 4.2.9.6-2
fcitx-gtk3 4.2.9.6-2
fcitx-qt5 1.2.3-9
fcitx-sunpinyin 0.4.2-1

最近编辑记录 Ruby (2019-08-24 15:30:21)

离线

#4 2019-08-24 16:21:12

zplinux
会员
所在地: 江西省
注册时间: 2014-10-12
帖子: 187

Re: 在QtCreator 中fcitx无法中文输入,其他软件都能输入。

莫非没有安装 fcitx ?或者是版本过低?

# pacman -S fcitx

Archlinux + DWM,喜欢 K.I.S.S 理念!

离线

#5 2019-08-24 22:38:40

Ruby
会员
注册时间: 2019-08-24
帖子: 4

Re: 在QtCreator 中fcitx无法中文输入,其他软件都能输入。

zplinux 说:

莫非没有安装 fcitx ?或者是版本过低?

# pacman -S fcitx

很感谢你的回复,但是不是这个问题。
pacman -Q  | grep fcitx
显示已经安装了,难道您没有认真看我的发布的信息吗?

离线

#6 2019-08-25 10:12:56

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

Re: 在QtCreator 中fcitx无法中文输入,其他软件都能输入。

前几天也到过,在qt creator上用不了,只能打英文,其他应用没事,可以正常使用。

看在下fcitx的输入状态,它并没有切换到中文输入状态。

然后更新QT的组件就好了,莫名其妙的。


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

离线

#7 2019-08-25 10:18:45

Ruby
会员
注册时间: 2019-08-24
帖子: 4

Re: 在QtCreator 中fcitx无法中文输入,其他软件都能输入。

luxni 说:

前几天也到过,在qt creator上用不了,只能打英文,其他应用没事,可以正常使用。

看在下fcitx的输入状态,它并没有切换到中文输入状态。

然后更新QT的组件就好了,莫名其妙的。

对我也是这种状况,无法切换到中文输入法。在其他地方切换到中文输入,
进入到Qt Creator里面会自动变成英文输入法。
请问,你的Qt是哪个版本的。
############################
这这是我的Qt Creator信息
Qt Creator 4.9.1
Based on Qt 5.12.3 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)

Built on May 27 2019 00:16:48

From revision 168e91b618

Copyright 2008-2019 The Qt Company Ltd. All rights reserved.

The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
###########################

最近编辑记录 Ruby (2019-08-25 10:19:48)

离线

页脚