首页| 论坛| 消息

标题:求助,Linux发布Qt WebEngine程序无法打开,如何解决?
作者:po_chan
日期:2020-03-31 18:13
内容:

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[/fo ..


#1 [po_chan 03-31 18:15]
已经加了QtWebEngineProcess丶Resources丶Translations三个库,仍然无法启动
#2 [20091001753 03-31 19:42]
在 pro 文件里添加:
QMAKE_LFLAGS += -no-pie -Wl,-rpath=.
有了这句话,你程序就会在自己的目录下,搜索动态库。
就像 win环境,程序会在自己目录下找 dll 一样。
这样可以大大的方便你测试所需要的库文件。
#3 [fsu0413 04-11 21:10]
既然是Linux,推荐用软件源里的Qt试试。
除非是自己搭的没有软件源的Linux,否则Qt一般都是软件源里有的。

回复 发表
主题 版块