标题:qwsServer->sendKeyEvent( -1, 9,Qt::NoModifier, true, false);
作者:tsuibin
日期:2009-04-03 14:44
内容:
qwsServer->sendKeyEvent( -1, 9,Qt::NoModifier, true, false);
#1 [tsuibin 04-03 14:45]
第一个和第二个参数要怎么设置?
第一个是unicode
第二个是ascii码?
#2 [benwang 04-06 20:17]
unicode is the unicode value of the key to send, keycode the Qt keycode (e.g. Key_Left), modifiers indicates whether, Shift/Alt/Ctrl keys are pressed, isPress is TRUE if this is a key down event and FALSE if it's a key up event, and autoRepeat is TRUE if this is an autorepeat event 。
以上Qt文档原文。
#3 [tsuibin 04-07 10:32]
这个英文文档没有任何的实际作用,我甚至不知道为什么第二个参数为9。
第二个参数的值还是在看qtcenter论坛的时候看到一个用户例子中的值。
发帖不是因为没有看文档。