在 QNX 上运行 Qt 应用程序
我正在尝试让 Qt 应用程序在 QNX 4.5 上运行。我已经在 Linux 机器上使用以下配置编译了 Qt 4.6.3:
./configure -xplatform 不支持/qws/qnx-i386-g++ -embedded i386 -no-gfx-linuxfb -no-mouse-linuxtp -no-kbd-tty -no-qt3support -qt-gfx-qnx -qt -mouse-qnx -qt-kbd-qnx -no-exceptions -little-endian -nomake 演示 -nomake 示例
“make”需要对环境进行一定的调整并注释掉一个函数,但最终有效。我已将字体和编译的 Qt 库复制到在 VMware 中运行的 QNX 上,并创建了一个示例 Qt 应用程序(它仅显示一个按钮),在我的 Linux 机器上编译该应用程序并将其复制到 QNX。
我有一个小脚本来启动应用程序:
io-display -d vid=0x15adh,did=0x405h
/usr/photon/bin/devi-hid -Pr kbd mouse
./app
它运行应用程序,启用实验性输入驱动程序。有了这个脚本,我可以通过在 Photon 中运行 Qt 应用程序来达到目的 - 屏幕渲染完全搞砸了,但我确实看到了我的 Qt 应用程序。
但是,如果我将 Photon 退出到文本模式,并尝试从那里运行应用程序(使用稍微修改过的脚本,并使用不同的 vid 和 did 值来启动图形服务器),我只会看到一个空白屏幕。
我对 QNX 和 Qt 完全陌生,所以现在有点卡住了。我正在尝试了解 Photon 的工作原理以及它设置的环境类型,以找到我在文本模式中可能缺少的内容。然而,我不确定这是否是一个正确的方向,所以我想我应该问问好人,以防有人以前经历过这个:)
干杯!
I'm trying to get Qt applications running on QNX 4.5. I've compiled Qt 4.6.3 on a linux box with this configuration:
./configure -xplatform unsupported/qws/qnx-i386-g++ -embedded i386 -no-gfx-linuxfb -no-mouse-linuxtp -no-kbd-tty -no-qt3support -qt-gfx-qnx -qt-mouse-qnx -qt-kbd-qnx -no-exceptions -little-endian -nomake demos -nomake examples
"make" required certain tweaking of environment and commenting out one function, but worked in the end. I've copied fonts and compiled Qt libraries onto QNX running in VMware, and created a sample Qt app (it just displays a button) which I compiled on my linux box and copied over to QNX.
I have a little script to launch the app:
io-display -d vid=0x15adh,did=0x405h
/usr/photon/bin/devi-hid -Pr kbd mouse
./app
Which runs the application, enabling experimental input drivers. With this script I was able to get somewhere by running the Qt app in Photon - screen rendering gets all screwed up, but I do see my Qt application.
However, if I exit Photon into a text mode, and try to run the application from there (using a slightly modified script with different vid and did values for launching the graphics server), I just see a blank screen.
I'm completely new to QNX and Qt, so I'm a bit stuck right now. I'm trying to read up on how Photon works and what kind of environment it sets up, to find what I might be missing in the text mode. However, I'm not sure this is even a right direction, so I thought I'd ask good folks on SO, in case somebody went through this before :)
cheers!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否尝试过在应用程序后添加“-qws”?它告诉 Qt 应用程序初始化其窗口系统 (qws)。只有 1 qt 应用程序需要(或可能具有)指定的选项。
我还会添加几个环境变量来帮助 Qt 知道在哪里可以找到键盘和鼠标。 (我也不确定您是否真的需要第一行。)
顺便说一句,QNX 刚刚发布了适用于 QNX 6.5 的 Qt 4.7.1 端口。它可以在 Foundry 27 Qt 项目站点 上找到。
Have you tried adding "-qws" after you app? It tells the Qt app to initialize it's windowing system (qws). Only 1 qt app needs (or may have) the option specified.
I would also add a couple of environment variables to help Qt to know where to find your keyboard and mouse. (I also am not sure if you really need the first line.)
BTW, QNX has just released a port of Qt 4.7.1 for QNX 6.5. It can be found on the Foundry 27 Qt Project site.