Qt Embedded for Linux。键盘布局切换很多次

时间:2015-06-22 07:39:01

标签: c++ qt embedded

我试试:

if(lang_toggle==0)
{
      server->closeKeyboard();
      currentKeyboardHandler =
             QKbdDriverFactory::create("TTY", "keymap=/root/ar.qmap");
      server->setKeyboardHandler(currentKeyboardHandler);
      lang_toggle = 1 ;
}
else if(lang_toggle==1)
{
      server->closeKeyboard();
      currentKeyboardHandler =
            QKbdDriverFactory::create("TTY", "keymap=/root/en.qmap");
      server->setKeyboardHandler(currentKeyboardHandler);
      lang_toggle = 0 ;
}

如上所述here

它对我有用,但经过一些toggel制作分段错误

0 个答案:

没有答案