Qt4 嵌入式 Linux 新手 - 应用程序管理、部署和总体架构?
首先,我为提出如此基本的问题深表歉意。我正在决定是否应该在嵌入式 Linux 设备上使用 Qt(第一次尝试将在 TI OMAP EVM 上)来开发 UI 以及管理设备上运行的应用程序(以及在运行期间添加删除应用程序)通过无线 (WiFi) 软件下载时间)。
我一直在阅读诺基亚 Qt 参考文档,感觉我错过了理解的基本步骤。
如果我可以澄清我所说的应用程序的含义(我不确定我读过的 Qt 文档是否与此一致):应用程序是在设备上运行并使用该设备的服务的程序。 所以我想我可以使用 Qt 作为应用程序框架,并从中调用(或启动)Qt 应用程序。应用示例有:电子邮件客户端、地图、笔记本等。 我会设想一个主窗口,其中包含可用应用程序的列表(可能是 Android 等图标),然后从该主窗口启动应用程序。如果事件来自系统,则应用程序框架将适当地路由事件,这可能会导致另一个应用程序使用全屏。
我(作为一个完全的新手)正在努力理解这是否意味着我必须运行一个应用程序,然后从中运行应用程序,或者 Qt 架构中是否有一些内置机制来执行此类应用程序启动。
因此,我显然需要从基础开始,而不是直接询问如何做到这一点。我读过有关 QWSServer 和 QWSClient 架构的内容,这在某种程度上是有意义的。 但是,我找不到有关如何
- 启动应用程序或管理它们的信息。 (谁启动/暂停应用程序?)
- 应用程序的部署模型(它们与 QWSServer 位于同一个 Linux 进程或线程中吗?)
- 如何在运行时添加应用程序?
我猜我错过了一个非常明显的顶级文档,它解释了这种基本功能。可能我应该花时间下载SDK并实际尝试使用Qt(再次抱歉,我现在没有太多时间做适当的工作:()
所以,如果有人可以指出我相关的方向文件,将不胜感激!
First off, I apologise hugely for asking such basic questions. I am in the process of deciding if I should use Qt on an embedded linux device (first attempt will be on a TI OMAP EVM) for developing a UI and also for managing applications that run on the device (and also adding removing applications during run time by over the air (WiFi) software downloads).
I have been reading the Nokia Qt reference documentation and feel like I have missed a basic step in my understanding.
If I may just clarify what i mean by an application (I am not sure the Qt documentation I have read aligns with this): An application is a program that runs on a device and uses the services of that device.
So I figure I can use Qt as an application framework, and invoke (or launch) Qt applications from it. Applications examples are: email client, mapping, notebook etc.
I would envisage one main window which has a list of the applications available (maybe icons like android etc) and then the applications are launched from this main window. If events come in from the system, then the application framework will route the events appropriately, and its possible that this will cause another application to use the full screen.
I'm struggling (as a complete newbie) to understand if this means i have to run an application and then run applications from that, or if there is some inbuilt mechanism in the Qt architecture to do this type of application launching.
So instead of asking a question directly about how to do that, i obviously need to start off from the basics. I’ve read about the QWSServer and QWSClient architecture and that makes sense in a vague way.
However, I can't find information on how to:
- launch applications or manage them. (Who launches/suspends an application?)
- Deployment models of applications (Are they in the same Linux process or thread as the QWSServer?)
- How to add a application at run time?
I'm guessing I have missed a blindingly obvious top level document that explains this sort of basic functionality. It may be that I should invest the time in downloading the SDK and actually try using Qt (apologies again, I don't get much time to do proper work nowadays :( )
So, if anyone could point me in the direction of the relevant documents, it would be very much appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Qt 是一个窗口工具包,而不是窗口管理器。
有一些适用于小型设备的 Qt 窗口管理器项目,当然整个 KDE 都是用 Qt 编写的。
Qt/Embedded 实际上只是 Qt 的硬件 - 而不是依赖操作系统或 X windows 来进行绘图。我认为您可能会将 Qt 与使用 Qt 作为 GUI 的诺基亚移动操作系统之一混淆。
Qt is a windowing toolkit - not a window manager.
There are a few Qt window manager projects for small devices and of course the whole of KDE is written in Qt.
Qt/Embedded is really just Qt down to the hardware - rather than relying on the operating system or X windows to do the drawing. I think you might be confusing Qt with one of the Nokia mobile operating systems that use Qt for their gui.
QWS 是一种专门设计用于支持嵌入式情况下的 Qt 应用程序的窗口系统,其中可能没有其他窗口管理器(或可接受的轻量级窗口管理器)。它的功能比 KDE 或 gnome 等重量级的要少一些,但处理事情的方式是相同的。然而,它的一个方面是您可以开发自己的插件来绘制窗口框架、标题栏等,以便按照您想要的方式设置它们的样式。
关于 QWS,您询问了:
操作系统启动和暂停应用程序。 QWS 是一个窗口系统,而不是操作系统。据我所知,它运行在 Linux 变体之上。您设想的主窗口可能最好开发为自己的应用程序,以某种方式启动其他应用程序。
它们通常位于窗口服务器之外的其他进程中。当然,根据您启动它们的方式,它们可能与您的启动板应用程序位于同一进程或不同进程中。请注意在同一进程中运行它的一个潜在问题:在给定进程中只能有一个 QApplication 实例。
我假设您的启动板将提供一种添加应用程序的机制,该机制会将其放置在磁盘上的适当位置。您可以使用它来执行任意数量的操作来更改要启动的应用程序列表。一个例子是根据一个受祝福的目录更新你的 GUI。另一种选择可能是将一个单独的插件与应用程序捆绑在一起,并且您的启动板应用程序加载这些插件以获取有关应用程序的信息。实际上,假设您提供在系统上安装应用程序的入口点,这里的可能性几乎是无限的。
QWS is a windowing system specifically designed to support Qt applications in embedded situations, in which there may be no other window manager (or acceptably lightweight one). It does a bit less than the heavyweight ones such as KDE or gnome, but handles things along the same lines. One of the aspects about it, however, is you can develop your own plugin to draw the window frames, title bars, etc., in order to style them the way you want to.
In reference to QWS, you asked about:
The operating system launches and suspends applications. The QWS is a windowing system, not an operating system. In the cases I know about, it runs on top of linux variants. Your envisioned main window would probably best be developed as its own application that launches other applications in some manner.
They are generally in other processes than the window server. Depending on how you launch them, of course, they may be in the same process or a different process as your launchpad application. Beware a potential problem of running it in the same process: you can only have one QApplication instance in a given process.
I would assume your launchpad would provide a mechanism for adding an application, which would put it in the appropriate place on disk. You could use this to do any number of things to alter the list of applications to launch. One example would be to just update your GUI based on a blessed directory. Another option might be to have a separate plugin bundled with the applications, and your launchpad application loads those plugins to get information about the applications. Really, the possibilities are almost endless here, assuming you provide the entry point to install the applications on the system.