Qt Tips
来源:互联网 发布:广东软件企业认定 编辑:程序博客网 时间:2024/06/08 11:49
A collection of tips&tricks for using Qt on embedded systems. Usually this was tested on one of the OMAP EVMs.
Using Virtual Display
This requires that Qt was configured with the option '-plugin-gfx-vnc'. Now start any Qt application as follows:
#./deform -qws -display "VNC"
Then connect a remote VNCviewer to your target (of course you need to know the IP address of the target in that case).
You may also use the default display and VNC at the same time:
#./deform -qws -display "VNC:LinuxFb"
Alternatively you can set the display using an environment variable before starting Qt.
#export QWS_DISPLAY="VNC" #export QWS_SIZE="1920x1080"
And yes, you can get real big displays on OMAP3 that way...
Touchscreen Support
If you have a screen supporting touch you need to follow below steps to make this available to your Qt applications.
Make sure you have Tslib installed to your platform. This will provide basic touchscreen support for a couple of devices. We have tested with the TSC2046 that is used on the TI/Mistral OMAP3 EVM for example.
Add dependencies to your mkspec gmake.conf accordingly:
#modifications to include ts-libQMAKE_INCDIR += /home/omap3/hd/workdir/filesys/usr/share/includeQMAKE_LIBDIR += /home/omap3/hd/workdir/filesys/lib
Run Qt configure again with option 'qt-mouse-tslib' (touch as primary mouse device) or '--plugin-mouse-tslib' (touch as optional mouse device). Now recompile Qt base libs.
Finally you need to modify your target environment with the following variables (path and device names are examples):
QWS_MOUSE_PROTO='Tslib:/dev/input/event1'TSLIB_CALIBFILE='/etc/pointercal'TSLIB_CONFFILE='/etc/ts.conf'TSLIB_CONSOLEDEVICE='none'TSLIB_FBDEVICE='/dev/fb0'TSLIB_PLUGINDIR='/lib/ts'TSLIB_TSDEVICE='/dev/input/event1'
You may have to call 'ts_calibrate' once to get your touch screen calibrated. Redo this if you change the rotation or screen size configuration.
QWT
QWT (http://qwt.sourceforge.net/) is a useful extension to Qt. To avoid linker issues use the define QWT_DLL when linking a QWT DLL.
- Qt Tips
- qt tips
- KDE/Qt Tips 004
- Qt's tips
- Symbian&Qt Tips
- QT Tips (持续更新)
- Qt Creator 使用tips
- Qt Little Tips
- QT tips QChart chart demo
- Qt 5.4 + OpenCV 进行图像处理Tips
- Some Tips and Tricks about Qt
- Qt tips 如何给qlabel添加边框
- Tips
- Tips
- Tips
- Tips
- > tips
- Tips
- Tokyocabinet/Tokyotyrant文档大合集
- JIVE论坛分析 - 简单数据库连接池设计
- gcc 预编译控制
- c#读写plist及binary plist文件
- 一个简单的DirecxShow应用程序
- Qt Tips
- 为什么世界不围着你转
- 关于jsp的EL表达式
- java破解又一篇( 转)
- 一个java框架的开发日记(2)
- MFC 组合键的实现
- 制作集成SP1的Visual Studio 2005
- _stdcall _cdecl fastcall 调用方式详解
- [转]用OpenOCD、GDB、Insight 调试U-BOOT