• 2339阅读
  • 3回复

[提问]求助,Linux发布Qt WebEngine程序无法打开,如何解决? [复制链接]

上一主题 下一主题
在线po_chan
 

只看楼主 倒序阅读 楼主  发表于: 2020-03-31

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:
本帖提到的人: @XChinux @liudianwu @圣域天子
在线po_chan

只看该作者 1楼 发表于: 2020-03-31
已经加了QtWebEngineProcessResources丶Translations三个库,仍然无法启动
离线20091001753

只看该作者 2楼 发表于: 2020-03-31
在 pro 文件里添加:
QMAKE_LFLAGS += -no-pie -Wl,-rpath=.

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

这样可以大大的方便你测试所需要的库文件。
(づ ̄ 3 ̄)づ
离线fsu0413

只看该作者 3楼 发表于: 2020-04-11
既然是Linux,推荐用软件源里的Qt试试。
除非是自己搭的没有软件源的Linux,否则Qt一般都是软件源里有的。
快速回复
限100 字节
 
上一个 下一个