2014-11-17 82 views
10

我有這種奇怪的情況,Qt Creator(v.3.2.1)將Qt從4.8更新到5.3後,將不會接受任何鍵盤輸入。鍵盤在其他應用程序中正常工作。更新到Qt5後Qt Creator沒有鍵盤輸入Qt5

我在使用XFCE的Debian Wheezy(7.7)上安裝了來自wheezy-backports的Qt5套件。 有沒有人有一個想法可以做些什麼呢?

更新: 按照要求,這裏的終端輸出:

libEGL warning: DRI2: failed to authenticate 
xkbcommon:ERROR: failed to add default include path auto 
Qt: Failed to create XKB context! 
Use QT_XKB_CONFIG_ROOT environmental variable to provide an addtional search path, 
add ':' as separator to provide several search paths and/or make sure that XKB 
configurationdata directory contains recent enough contents, to update please see 
http://cgit.freedesktop.org/xkeyboard-config/ . 
+1

你可以打開一個控制檯,輸入'qtcreator'並與更新您的問題你獲得的消息? – Antwane

+0

做捷徑的工作? – prajmus

+0

@prajmus不,快捷鍵也不起作用。 – virt

回答

11

這顯然是一個已知的錯誤,一些消息和帖子有關互聯網在這個問題上的談判。

也許嘗試這一點,從https://lists.debian.org/debian-backports/2014/10/msg00061.html

Opening Qt5 applications from backports (or self compiled against backported Qt5) have some trouble finding XCB data:

$ /usr/lib/x86_64-linux-gnu/qt5/examples/quick/d ialogs/systemdialogs/systemdialogs xkbcommon: ERROR: failed to add default include path auto Qt: Failed to create XKB context! Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .

Applications run fine, but can't get input from the keyboard.

As the warning points out, setting the environment variable fixes it:

export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb

所以,儘量與如下因素命令運行qtcreator:

export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb & qtcreator 
+0

我不得不做導出和qtcreator兩步開始,但現在它再次工作。非常感謝大家! – virt

+0

如果您從SSH客戶端登錄並獲取請求QT_XKB_CONFIG_ROOT變量的錯誤消息。然後轉到您正在登錄的用戶的主目錄,並在文件的末尾插入行導出QT_XKB_CONFIG_ROOT =/usr/share/X11/xkb .bashrc – elhombre