查看完整版本: [-- 求助,Linux发布Qt WebEngine程序无法打开,如何解决? --]

QTCN开发网 -> Qt安装与发布 -> 求助,Linux发布Qt WebEngine程序无法打开,如何解决? [打印本页] 登录 -> 注册 -> 回复主题 -> 发表主题

po_chan 2020-03-31 18:13

求助,Linux发布Qt WebEngine程序无法打开,如何解决?


Deploying Qt WebEngine Processes
Qt WebEngine takes advantage of the multi-process model that the Chromium project offers. The multi-process model requires that the Qt WebEngine Process executable be deployed alongside your application.
The WebEngine process is executed for each QWebEngineView or WebEngineView instance. For example, a browser application with two tabs open should have two separate instances of the process running. This is a common approach used by most modern web engines to provide a stable browsing experience.
At runtime, Qt WebEngine looks for the QtWebEngineProcess executable in the directory that QLibraryInfo::location(QLibraryInfo::LibraryExecutablesPath) returns. For Qt installations, this is QTDIR/libexec (Linux) or QTDIR\bin (Windows). The path can be changed by defining a qt.conf file, for example. Alternatively, an executable path can be set as a value of the QTWEBENGINEPROCESS_PATH environment variable. On macOS, Qt WebEngine looks for the executable in .app/Helpers/QtWebEngineProcess.
Deploying Resources
Qt WebEngine requires the following resource files:
  • qtwebengine_resources.pak contains the resources needed by Chromium.
  • qtwebengine_devtools_resources.pak contains tools for remote debugging.
  • qtwebengine_resources_100p.pak contains images suitable for low resolution displays.
  • qtwebengine_resources_200p.pak contains images suitable for high DPI displays.
  • icudtl.dat provides support for International Components for Unicode (ICU). It is the Chromium version of ICU, which is not needed if Qt WebEngine was configured to use the system ICU.

Resources are searched from the following locations:
Translations
Locale data (such as en-US.pak) is searched form the following locations:

po_chan 2020-03-31 18:15
已经加了QtWebEngineProcessResources丶Translations三个库,仍然无法启动

20091001753 2020-03-31 19:42
在 pro 文件里添加:
QMAKE_LFLAGS += -no-pie -Wl,-rpath=.

有了这句话,你程序就会在自己的目录下,搜索动态库。
就像 win环境,程序会在自己目录下找 dll 一样。

这样可以大大的方便你测试所需要的库文件。

fsu0413 2020-04-11 21:10
既然是Linux,推荐用软件源里的Qt试试。
除非是自己搭的没有软件源的Linux,否则Qt一般都是软件源里有的。


查看完整版本: [-- 求助,Linux发布Qt WebEngine程序无法打开,如何解决? --] [-- top --]



Powered by phpwind v8.7 Code ©2003-2011 phpwind
Gzip disabled