首页| 论坛| 消息

回复: qtembedded的桌面系统EMD(即Embedded desktop)
#26 [yinsun_01 06-30 10:34]
请问你移植的MurphyPinyin是哪一个版本, 我看到在实用中有许多错误, 如"退格键"无法用等.
如果要增加对软键盘的支持, 你有何好的建议? 多谢!
#27 [zzz945 06-30 17:50]
哪一个版本还真不好说, 我好像记得MurphyPinyin原本是QTopia的, 某人移植到了QtEmbedded上, 我就是拿某人的稍微改了一下而已。 添加软键盘其实很简单, 首先写一个软键盘的界面, 各个键都是个按钮, 鼠标点在按钮上就调用这个函数
void QWSServer::sendKeyEvent ( int unicode, int keycode, Qt::KeyboardModifiers modifiers, bool isPress, bool autoRepeat )
Sends the given key event. The key is identified by its unicode value and the given keycode, modifiers, isPress and autoRepeat parameters.
Use this function to send key events generated by "virtual keyboards" (note that the processKeyEvent() function is impelemented using this function).
The keycode parameter is the Qt keycode value as defined by the Qt::Key enum. The modifiers is an OR combination of Qt::KeyboardModifier values, indicating whether Shift/Alt/Ctrl keys are pressed. The isPress parameter is true if the event is a key press event and autoRepeat is true if the event is caused by an auto-repeat mechanism and not an actual key press.
Note that this function can only be used in the server process.
See also processKeyEvent() and Qt for Embedded Linux Character Input.
在我这退格键好像没有问题
#28 [磐石 07-01 17:25]
好东西,多谢分享,经过修改编译通过,能下到板子了,接下来的时间就好好吸收你的思想.
#29 [zzz945 07-01 18:01]
不用谢, 以后还得靠各位得努力把它做得更好
#30 [磐石 07-01 22:58]
看了一晚上你写的代码,感觉相当精巧,对着你的代码查帮助文档,学到了好多QT中类及API的用法,现在大致思想看明白了,一些细节慢慢研究。先请教一个问题,就是QSS文件怎么写,界面的颜色怎么搭配,就是那个参数怎么设置,比方说你写的QSS文件中的一条
QTabBar::tab:selected, QTabBar::tab:hover {
background: qradialgradient(cx:0.5, cy:0.5, radius: 0.5,
fx:0.5, fy:0.5, stop:0 #202020, stop:1 #784D4D);
}
里面的数字是怎么弄出来的,你有这方面的资料吗,有的话,希望楼主能传我一份,panshi5208@163.com
万分感谢

<< 4 5 6 7 8 >> (6/40)

回复 发表
主题 版块