Hello :
I encountered fatal error when I attempted to add qtwebengine5.6.3 module to compile. The error message showed as "src/core/content/public/browser/browser_context.h:11:35: fatal error: base/callback_forward.h: No such file or directory
"
Then I found almost all of the missed files could be found in file-folder : /qtwebengine/src/3rdparty/chromium . And the complaining header files ues wrong code such as :"#include "/base/***.h"" which points to wrong direction. Is there any wrong in the header file or I have some misoperation during compilation?
[[qanda:topic_unsolved]] Missing header files when compile qtwebengine
[[qanda:topic_unsolved]] Webengine QT5.12.6 cross compile arm-linux-gnueabihf-g++ 8.3.0
Good afternoon!
Trying to build Webengine from git
git clone https://github.com/qt/qtwebengine.git -b v5.12.6 --depth 1 --recursive
Build using qmake:
$ any_path/bin/qmake QMAKE_LIBDIR_OPENGL_ES2=/usr/lib/arm-linux-gnueabihf QMAKE_LIBDIR_EGL=/usr/lib/arm-linux-gnueabihf
I receive an error:
[8214/14119] /usr/bin/g++ -MMD -MF host/obj/crypto/crypto/ec_signature_creator_impl.o.d -DCRYPTO_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Ihost/gen -I../../3rdparty/chromium -I../../3rdparty/chromium/third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-dangling-else -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -isystem../../../../../../../../../usr/include/nss -isystem../../../../../../../../../usr/include/nspr -std=gnu++14 -Wno-narrowing -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../3rdparty/chromium/crypto/ec_signature_creator_impl.cc -o host/obj/crypto/crypto/ec_signature_creator_impl.o
[8215/14119] /usr/bin/g++ -MMD -MF host/obj/crypto/crypto/encryptor.o.d -DCRYPTO_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Ihost/gen -I../../3rdparty/chromium -I../../3rdparty/chromium/third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-dangling-else -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -isystem../../../../../../../../../usr/include/nss -isystem../../../../../../../../../usr/include/nspr -std=gnu++14 -Wno-narrowing -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../3rdparty/chromium/crypto/encryptor.cc -o host/obj/crypto/crypto/encryptor.o
[8216/14119] /usr/bin/g++ -MMD -MF host/obj/crypto/crypto/nss_key_util.o.d -DCRYPTO_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Ihost/gen -I../../3rdparty/chromium -I../../3rdparty/chromium/third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-dangling-else -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -isystem../../../../../../../../../usr/include/nss -isystem../../../../../../../../../usr/include/nspr -std=gnu++14 -Wno-narrowing -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../3rdparty/chromium/crypto/nss_key_util.cc -o host/obj/crypto/crypto/nss_key_util.o
FAILED: host/obj/crypto/crypto/nss_key_util.o
/usr/bin/g++ -MMD -MF host/obj/crypto/crypto/nss_key_util.o.d -DCRYPTO_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Ihost/gen -I../../3rdparty/chromium -I../../3rdparty/chromium/third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-dangling-else -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -isystem../../../../../../../../../usr/include/nss -isystem../../../../../../../../../usr/include/nspr -std=gnu++14 -Wno-narrowing -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../3rdparty/chromium/crypto/nss_key_util.cc -o host/obj/crypto/crypto/nss_key_util.o
In file included from ../../3rdparty/chromium/crypto/nss_key_util.h:14,
from ../../3rdparty/chromium/crypto/nss_key_util.cc:5:
../../3rdparty/chromium/crypto/scoped_nss_types.h:8:10: fatal error: keyhi.h: No such file or directory
8 | #include <keyhi.h>
| ^~~~~~~~~
compilation terminated.
[8217/14119] /usr/bin/g++ -MMD -MF host/obj/crypto/crypto/hkdf.o.d -DCRYPTO_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Ihost/gen -I../../3rdparty/chromium -I../../3rdparty/chromium/third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-dangling-else -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -isystem../../../../../../../../../usr/include/nss -isystem../../../../../../../../../usr/include/nspr -std=gnu++14 -Wno-narrowing -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../3rdparty/chromium/crypto/hkdf.cc -o host/obj/crypto/crypto/hkdf.o
[8218/14119] /usr/bin/g++ -MMD -MF host/obj/crypto/crypto/hmac.o.d -DCRYPTO_IMPLEMENTATION -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_NSS_CERTS=1 -DUSE_OZONE=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DOFFICIAL_BUILD -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DTOOLKIT_QT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Ihost/gen -I../../3rdparty/chromium -I../../3rdparty/chromium/third_party/boringssl/src/include -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -funwind-tables -fPIC -pipe -pthread -m64 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-deprecated-declarations -fno-delete-null-pointer-checks -Wno-comments -Wno-dangling-else -Wno-packed-not-aligned -Wno-missing-field-initializers -Wno-unused-parameter -O2 -fno-ident -fdata-sections -ffunction-sections -fno-omit-frame-pointer -g0 -fvisibility=hidden -isystem../../../../../../../../../usr/include/nss -isystem../../../../../../../../../usr/include/nspr -std=gnu++14 -Wno-narrowing -Wno-attributes -Wno-class-memaccess -Wno-subobject-linkage -fno-exceptions -fno-rtti -fvisibility-inlines-hidden -c ../../3rdparty/chromium/crypto/hmac.cc -o host/obj/crypto/crypto/hmac.o
ninja: build stopped: subcommand failed.
Makefile.gn_run:362: recipe execution error for the target «run_ninja»
make[3]: *** [run_ninja] Error 1
make[3]: exit from directory
«/BD5126omx83/src/qtwebengine/src/core»
Makefile:82: recipe execution error for the target «sub-gn_run-pro-make_first»
make[2]: *** [sub-gn_run-pro-make_first] Error 2
make[2]:exit from directory «/BD5126omx83/src/qtwebengine/src/core»
Makefile:79: recipe execution error for the target «sub-core-make_first»
make[1]: *** [sub-core-make_first] Error 2
make[1]: exit from directory «/BD5126omx83/src/qtwebengine/src»
Makefile:48:recipe execution error for the target «sub-src-make_first»
make: *** [sub-src-make_first] Error 2
File keyhi.h is available in sysroot/usr/include/nss.
Tried on similarly https://bugreports.qt.io/browse/QTBUG-65079
In what direction to go, please tell me?
Thank you very much.
[[qanda:topic_unsolved]] unknown module(s) in QT : webengine (or : webenginewidgets)
[[qanda:topic_unsolved]] Cannot find pkg-config
[[qanda:topic_unsolved]] Why web page loaded with WebEngineView is not same that if same page is loaded in IE or Chrome?
Hello guys,
All is on tittle,
here picture show difference between IE/Chrome and QML with webEngineView QT 5.11 windows 7 64 bits:
Do you know why?
thanks for your help
[[qanda:topic_solved]] enabled Web3Gl
[[qanda:topic_unsolved]] QQuickWindow flickering (QT 5.14)
Hi,
First of all, the flickering was even worse in 5.12.5, but is still there, depending on the performance of the host device.
I have a class, which is a QQuickWindow and receives a QML including WebChannel and the WebEngineView. I'm rendering an image, which I get from an external camera and 3D content as overlay (so that you know, it is an AR application). I have the following issues:
- The rendering of the camera image already takes up a lot of the GPU resources.
- The WebView is extremely slow. I also observed it from the "Qt Simple Browser" example in Qt. The same things I do there, in a normal chrome browser it runs much faster
- Flickering happens, when I use Intel Integrated Graphics (on NVidia it is not there or only minimal) - on Windows. On Linux it doesn't really happen.
I tried a few things already, I cannot count them all. For example, I disabled AA_EnableHighDpiScaling
or activated Qt::AA_UseOpenGLES
and some other things.
So, there are actually 3 problems I cannot find a solution to:
1.) Image rendering takes up too many resources
2.) Webview is extremely slow
3.) The flickering problem
Can anyone help me out?
Thanks in advance.
[[qanda:topic_unsolved]] WebEngine application do not work as standalone
Hi guys,
I'm trying to run the Qt WebView application on Windows 7. It works perfectly for me run with Qt Creator 4.7.2 but when I deploy the application on windows with windeplyoqt and copy libssl-1_1-x64.dll and libcrypto-1_1-x64.dll on app directory . There is no error, the app just closes immediately after starting.
I am using the MSVC2017 64bit Desktop Kit and Qt 5.14. Are there any known issues for Webview / Webengine on Windows?
windeployqt.exe --qmldir "E:\webEngineApp" "E:\AffichageMeteo\Info.exe"
Trying in debug mode I received:
I hope you can help me.
[[qanda:topic_unsolved]] Capturing user credentials from Login Page
[[qanda:topic_unsolved]] Can't load page.
Hi,
First of all, this is my first post here. Hopefully it's in the right category.
For my company we're looking for a wrapper to run our Unity WebGL build in. We want to do specific things you can't with a regular browser.
Upon download QT creator and starting their nano browser example, i browsed to our Unity project.
However, I get multiple errors and I honestly have no clue where to start searching for this issue.
Below is a part of the error log:
I have hiden the address to our servers etc since i'm not sure if my company agrees with posting all of that only. But that's only the address its connecting to. So that shouldnt be needed I guess?
Any help/direction to start looking is appreciated. If you need any more info just let me know. I will do my best to deliver it.
Thanks in advance!
[[qanda:topic_unsolved]] Can't build WebEngine on linux with proprietary codecs
[[qanda:topic_unsolved]] How to intercept Ctrl + Click on external links
Hi, I'm currently working on an web-browser-like app that work with our own file format (.zim) and scheme. When the URL's scheme is our own we open it in our app, otherwise in the default user's web browser like Firefox or Chrome. We implemented the possibility to open a link in a new tab with the Ctrl+Click command thanks to the QWebEngineView::createWindow(QWebEnginePage::WebWindowType type) method where if the type is QWebEnginePage::WebBrowserBackgroundTab or QWebEnginePage::WebBrowserTab we create a new tab in our app. The problem is if we Ctrl+Click on an external link, it opens a new empty tab in our app and on the default user's web browser too. Do you know where I can intercept the request to know simultaneously if it's an external link and if it's a Ctrl+Click event ?
[[qanda:topic_unsolved]] QWebEngineView crash in 5.12.3
I moved from QT 5.11.1 to QT 5.12.3. Whenever my application opens QWebEngineView, it crashes in 5.12.3. It works fine in 5.11.1. I also get the below warning in QT 5.12.3.
Release of profile requested but WebEnginePage still not deleted. Expect troubles !
Any idea what can be the cause?
[[qanda:topic_unsolved]] QWebEngine - how to catch execution of any javascripts from C++
I know how to communicate between C++ and Javascript in Qt WebEngine from this tutorial: https://myprogrammingnotes.com/communication-c-javascript-qt-webengine.html
But that is a case when I'm the author of loaded page so C++ and HTML parts are programmed by me. But is it possible to catch any javascript executed on any page loaded (like google.com etc)? Some kind of signal emitted when JS is executed so I could investigate function name and input args. QWebEnginePage->QWebEngineScriptCollection->scripts()
return only my own injected scripts, it doesn't contain page scripts.
Regards
[[qanda:topic_unsolved]] QWebEngineUrlRequestInterceptor - get content response
I'm able to catch requested urls by installing custom request interceptor but QWebEngineUrlRequestInfo
contains only urls. Is it also possible to catch content which is return by those requests? Some kind of Response Interceptor?
void RequestInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
{
qDebug() << "IN " << info.requestMethod().toStdString().data() << " " << info.initiator().toString();
qDebug() << "FP " << info.requestMethod().toStdString().data() << " " << info.firstPartyUrl().toString();
qDebug() << "RL " << info.requestMethod().toStdString().data() << " " << info.requestUrl().toString();
}
[[qanda:topic_unsolved]] Chromedriver support in Qt 5.12?
I am attempting to build chromedriver for the QtWebEngine as part of Qt5.12, which is based on Chromium 69.0.3497.128. QtWebEngine is successfully cross-compiled for 32bit embedded Linux target. No chromedriver is built as part of this build however. I cannot find any details on how to enable it or if it is supported in Qt5.12, or if it plans to be supported in the future.
Looking at the source, I can see chromedriver in the QtWebEngine source (qtwebengine/src/3rdparty/chromium/chrome/test/chromedriver), however it is just a mostly empty directory with a BUILD.gn file. Looking at the Chromium project at 69.0.3497.128 there is a full source for chromedriver (https://github.com/chromium/chromium/tree/69.0.3497.128/chrome/test/chromedriver).
Attempts at dropping this source into the QtWebEngine tree do not yield it being automatically picked up to be built. Attempting to use the QtWebEngine gn/ninja tools to build the Chromium chromedriver source does not seem to be directly supported either.
Is there a Qt supported approach to including chromedriver (or any webdriver implementation) in the QtWebEngine build?
[[qanda:topic_solved]] QtWebEngine signing issues
[[qanda:topic_unsolved]] QWebEngineUrlRequestInterceptor - get headers
[[qanda:topic_unsolved]] Avoid that a long touch is translated to a right click
Apparently, in Chromium and hence QtWebEngine, a long press on a touch screen is translated to a right click (a long mouse-click works fine).
So I want to (try to) capture the touch events in a MouseArea and send them as mouse-click events to WebEngineView (other suggestions are welcomed!)
My QML looks like
WebEngineView {
id: webId
anchors.fill: parent
url: "https://www.qt.io"
}
MouseArea {
anchors.fill: parent
onClicked: clickSimulator.emulateMouseClick(webId, mouse.x, mouse.y)
}
where clickSimulator
is a context property C++ object containing ao.
Q_INVOKABLE void emulateMouseClick(QObject* webView, int mouseX, int mouseY) const;
and in this function, I would like to send QMouseEvent
s to this webView using QCoreApplication::sendEvent
.
However, I can't seem to get this working.
When debugging, the emulateMouseClick
received a QQmlPrivate::QQmlElement<QQuickWebEngineView>`.
I'm not sure how to proceed from here. Suggestions are appreciated.
[[qanda:topic_unsolved]] QWebEngineView WebRTC udp/tcp test failed?
I just want to use WebRTC in the QWebEngineView, but it seems udp/tcp was not supported and how to resovle it?
Here is my simple code:
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
webView = new QWebEngineView;
connect(webView->page(),
SIGNAL(featurePermissionRequested(const QUrl&, QWebEnginePage::Feature)),
SLOT(featurePermissionRequested(const QUrl&, QWebEnginePage::Feature)));
QUrl url = QUrl("https://test.webrtc.org/");
this->webView->setUrl(url);
this->webView->show();
this->setCentralWidget(this->webView);
}
void MainWindow::featurePermissionRequested(const QUrl &securityOrigin,
QWebEnginePage::Feature feature)
{
qDebug() << "securityOrigin" << securityOrigin << feature;
this->webView->page()->setFeaturePermission(securityOrigin,
feature, QWebEnginePage::PermissionGrantedByUser);
}