问题描述
我正在为基于ARM的目标(TI AM335x EVM)的Qt5.2应用程序进行交叉编译,但是它无法在我的平台上显示任何内容.经过一番谷歌搜索,我发现如果我用以下方法启动它:
I was doing some cross compiling of a Qt5.2 application for an ARM based target (TI AM335x EVM) and it was failing to display anything on my platform. After doing some google’ing I found that if I launched it with:
./helloworld -platform eglfs
它会显示出来(全屏,但可以)!
it would show up (full screen, but it worked)!
我开始查看所有平台选项,发现:
I started looking at all the platform options, I found:
我想知道它们的作用.例如,我假设如果我想在Android设备上运行我的应用程序,则必须通过-platform android
,但是它们对我来说并不很明显.
I’m wondering what they are for. I assume, for example, that if I wanted to run my application on an Android device I’d have to pass -platform android
, but they’re not all obvious to me.
何时应该使用这些参数中的每个参数?
Is there a listing anywhere of when each of these parameters should be used?
例如,eglfs
代表什么?为什么我需要在linuxfb
无法正常工作的地方使用它?
(我本以为linux帧缓冲区是我的应用程序的运行方式,因为它运行在嵌入式linux上)
For example, what does eglfs
stand for? And why did I need to use that where as linuxfb
didn’t work?
(I would have thought the linux frame buffer was how I wanted to launch my application since it was running on embedded linux)
推荐答案
如果linuxfb
插件不起作用,则可能是您未在系统上正确配置帧缓冲设备.也许Directf层已经在运行,所以您可能想尝试使用directfb
插件.
If the linuxfb
plugin doesn't work, then possibly you didn't correctly configure the framebuffer device on your system. Maybe a directf layer is already running, so you may want to try the directfb
plugin instead.
如果希望避免在运行可执行文件时指定平台选项,则可以在构建Qt时将默认选项传递给configure
.
If you wish to avoid having to specify the platform option when you run the executable, you can pass the default one to configure
when you build Qt.
插件可以描述如下:
-
Linux插件-使用Linux特定的输入设备和各种输出设备的
Linux plugins - those use Linux-specific input devices and various output devices
-
eglfs-在全屏模式下使用OpenGL ES.没有其他方法,因为OpenGL没有窗口管理器的概念.
eglfs - Uses the OpenGL ES in fullscreen mode. There's no other way since OpenGL has no concept of a window manager.
directfb(不是directfp)-通过 directfb 层将Linux帧缓冲区与OpenGL ES一起使用.集成到directfb窗口中.
directfb (not directfp) - Uses the linux frame buffer with OpenGL ES via the directfb layer. Integrates into the directfb windowing.
linuxfb-在全屏模式下使用linux帧缓冲区.没有其他方法,因为linuxfb没有窗口管理器的概念.
linuxfb - Uses the linux frame buffer in fullscreen mode. There's no other way since linuxfb has no concept of a window manager.
kms-在全屏模式下使用linux内核模式设置API.没有其他方法,因为DRM没有窗口管理器的概念.
kms - Uses linux kernel modesetting API in fullscreen mode. There's no other way since DRM has no concept of a window manager.
openwfd-在全屏模式下使用 openwfd Wifi显示.由于openwfd没有窗口管理器的概念,因此没有其他方法.
openwfd - Uses an openwfd Wifi display in fullscreen mode. There's no other way since openwfd has no concept of a window manager.
与平台无关的插件-可以在任何操作系统上运行
Platform-independent plugins - could be made to run on any OS
-
xcb-在X11服务器上运行,并集成到X11窗口环境中.通常,如果没有窗口管理器也无法正常运行.如果您想将应用程序从Windows服务器提供给X11瘦终端(通常是Unix机顶盒),则可以在Windows上(在xlib的Windows实现下)运行.
xcb - Runs on an X11 server and is integrated into the X11 windowing environment. Generally it won't behave correctly without a window manager running as well. Can be made to work on Windows, given a Windows implementation of xlib, if you want to, say, serve applications from a Windows server to X11 thin terminals (typically Unix boxes).
屏幕外-渲染到屏幕外缓冲区.对于渲染到自定义显示很有用.
offscreen - Renders to an offscreen buffer. Useful for rendering to custom displays.
minimal-最小的后备存储,可以选择将虚拟屏幕转储到文件中.实现最低限度的功能只是为了演示如何开始编写平台插件.
minimal - A minimalistic backing store that optionally dumps the virtual screen to a file. Implements the bare minimum of functionality just to demonstrate how to start writing a platform plugin.
其他特定于平台的插件
-
android-使用Android API,并集成到Android环境中.
android - Uses the Android APIs and is integrated into the Android environment.
windows-使用WINAPI,并集成到Windows窗口环境中.
windows - Uses the WINAPI and is integrated into the Windows windowing environment.
可可-使用可可API,并集成到OS X窗口环境中.
cocoa - Uses the Cocoa APIs and is integrated into the OS X windowing environment.
iOS-使用iOS工具包,并集成到iOS环境中.
iOS - Uses the iOS toolkits and is integrated into the iOS environment.
qnx-使用QNX API,并集成到QNX光子窗口环境中.
qnx - Uses the QNX APIs and is integrated into the QNX photon windowing environment.
这篇关于各种Qt平台插件有什么用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!