简体   繁体   English

在没有安装Qt的计算机上运行Qt应用程序。 QCamera看不到可用的设备

[英]Run Qt application on computer without installed Qt. QCamera don't see available devices

I'm developping a Network/Gui application. 我正在开发一个Network / Gui应用程序。 I'm testing the application on another computer, which does not have Qt installed. 我正在另一台没有安装Qt的计算机上测试该应用程序。 But when I start the application, QCamera::availableDevices() returns an empty list. 但是当我启动应用程序时, QCamera :: availableDevices()返回一个空列表。 When I start this application on the computer which has Qt installed, it returns a list with all cameras on this computer. 当我在安装了Qt的计算机上启动此应用程序时,它会返回包含此计算机上所有摄像头的列表。

I think that the problem is in the QMultimedia back-end plugin, which is not loaded automatically. 我认为问题出在QMultimedia后端插件中,该插件未自动加载。 How can I get a list of loaded Qt plugins? 如何获取加载的Qt插件列表?

You can try to use qt.conf file approach to set the depending plugins location. 您可以尝试使用qt.conf文件方法来设置依赖插件的位置。 As Qt docs say: 正如Qt博士所说:

Without qt.conf, the Qt libraries will use the hard-coded paths to look for plugins, translations, and so on. 如果没有qt.conf,Qt库将使用硬编码路径来查找插件,翻译等。 These paths may not exist on the target system, or they may not be accessible. 这些路径可能不存在于目标系统上,或者可能无法访问。 Because of this, you need qt.conf to make the Qt libraries look elsewhere. 因此,您需要使用qt.conf来使Qt库在其他地方看起来。

How to use qt.conf 如何使用qt.conf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM