Quantcast
Channel: QtWebEngine
Viewing all 13965 articles
Browse latest View live

[[qanda:topic_unsolved]] QtWebEngineProcess OSX codesign issues

$
0
0

I tried to sign and notarize example application "simplebrowser" from Qt5.12.7 examples.

If I sign the main application: simplebrowser.app/Contents/MacOS/simplebrowser with deep and runtime options It works perfect, but I cannot notarize this bundle because I have to sign simplebrowser.app/Contents/Frameworks/QtWebEngineCore.framework/Helpers/QtWebEngineProcess.app/Contents/MacOS/QtWebEngineProcess too. If I make this, I can notarize the application. But the program does not work on websites with Java Script.

Also I tried this solution: https://forum.qt.io/topic/102212/qtwebengine-signing-issues It does not work


[[qanda:topic_unsolved]] Question to example simplebrowser and QWebEngineDownloadItem

$
0
0

Hello,

I have a little question regarding the download mechanism in QT-WebEngine.
For this I took a look at the example "simplebrowser".

There is a class "Browser" in which the "DownloadManagerWidget" receives a call to "downloadRequested". Then a path will be set where the download has to be saved.

The question I have is, how can I create my own QWebEngineDownloadItem, which will be created when the user hits "Save as"?

The background for this question is, that I would like to use that example to build a mini-download-manager, which will automatically download a file (no "Save as" user-action) whose url I read from the source-code (this I have already done).

If my question is not understandable, please let me know and I will try to precise.

Thanks,
Tom

[[qanda:topic_unsolved]] Wow: 2020 and still no QWebEnginge for mingw

$
0
0
Thanks SGaist, why don't we chang to CLand as the main compiler for Qt? BTW: Do they support gcc on linux? Thanks

[[qanda:topic_unsolved]] QtWebEngine will not be built. Platform unsupported

$
0
0

I am cross-compiling Qt for ARM board. My source file is Qt 5.14.1 and tool chain is gcc-linaro-5.3.1.
This is my configuration :

#!/bin/bash

./configure \
        -v \
        -prefix /opt/Qt5.14 \
        -opensource \
        -confirm-license \
        -debug \
        -release \
        -shared \
        -strip \
        -qreal float \
        -make libs \
        -make tools \
        -xplatform linux-arm-gnueabihf-g++ \
        -pch \
        -no-sse2 \
        -no-sse3 \
        -no-rpath \
        -no-tslib \
        -no-opengl \
        -no-cups \
        -qt-zlib \
        -widgets \
        -skip qt3d \
        -skip qtcanvas3d \
        -nomake examples \
        -no-use-gold-linker \

But it shows as below after run ./configure:

Note: Overriding option 'debug' with 'no' (was: 'yes')

Note: Also available for Linux: linux-clang linux-icc

Note: QtSerialBus: Cannot find linux/can.h and linux/can/raw.h Linux headers for socketCAN support.

Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.

Note: The following modules are not being compiled in this configuration:
    webenginecore
    webengine
    webenginewidgets

WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.

Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
On macOS, you can use Homebrew's llvm package.
On Windows, you must set LLVM_INSTALL_DIR to the installation path.

WARNING: QtWebEngine will not be built. Platform unsupported.

WARNING: QtWebEngine will not be built.

WARNING: QtPdf will not be built.

What does 'Platform unsupported' mean ? Is there any tutorial for cross-compiling Qt with qtwebengine?

[[qanda:topic_unsolved]] Long press from touch screen is handled different from long mouse press

$
0
0

We have a website that uses long-presses. When accessing this website from a WebEngineView in QML, we note that

  • a long-mouse-press is handled correctly
  • a long-touch-press gets translated to a right click

Note that we see the same behavior when accessing this webpage directly from Chromium. It works fine when opening this webpage from Firefox.

I assume that this happens because the long-touch-presses have mouse.source=Qt.MouseEventSynthesizedByQt while long-mouse-presses have mouse.source==Qt.MouseEventNotSynthesized

So I would like to make this webpage work in WebEngineView .
Which options do you see?

One option I see is to recompile Qt and remove MouseEventSynthesizedByQt. This is new to me so what is the best/suggested approach here?
Change (in qevent.cpp)

Qt::MouseEventSource QMouseEvent::source() const
{
    return Qt::MouseEventNotSynthesized; //QGuiApplicationPrivate::mouseEventSource(this);
}

or replace the limited number (< 10) of occurences where MouseEventSynthesizedByQt is used by MouseEventNotSynthesized?

[[qanda:topic_unsolved]] Is it possible to set a zoomFactor outside 0.25~5

$
0
0

I'm developing an SVG viewer. I tried QSvgRender+QGraphicsView, but it doesn't support text selection with the mouse. Finally, I find QWebEngineView works well. However, the zoomFactor range is 0.25~5 which is a shortcoming. I want to remove the limit and don't know if this thought is possible. Thanks!

[[qanda:topic_unsolved]] Cross-compiled QtWebengine raises EGL_BAD_CONTEXT error on Arm64

$
0
0

Hello,
I ported a QtQuick QtWebengine based app that works very well on x86_64 for an aarch64 SBC. After cross-compilation and deployment, every aspect of the app like QtWindow QtControl, Images, etc worked fine
but failed to load QtWebengine.
When I run:

webengine_app -platform eglfs

I got multiple repeats of this error message on my ssh terminal, then it hangs:


[3844:3875:0218/130036.767422:ERROR:gl_context_egl.cc(199)] eglCreateContext failed with error EGL_BAD_CONTEXT
[3844:3875:0218/130036.767638:ERROR:gles2_command_buffer_stub.cc(262)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.

I tested a fresh Webengine example: Qt Quick Minimal but got the same error messages. Other non-webengine examples like QtQuick Clock Example worked.

My Arm64 Spec:

  • Qt version is 5.12.7 on Ubuntu Server 18.4.3

  • RockChip rk3399 Dual Cortex-A72 + Quad Cortex-A53, 64-bit CPU

  • Graphics: Mali-T864 GPU, OpenGL ES1.1/2.0/3.0/3.1, OpenCL, DX11

  • Memory: 2GB Ram, 16GB EEMC

Configuration for compilation:

~/amboxQt/qt-everywhere-src-5.12.7/configure -opengl es2 -eglfs -no-xcb \
-shared -c++std c++14 -v \
-opensource -release --confirm-license \
-device linux-khadas-edge-g++ \
-device-option CROSS_COMPILE=$HOME/amboxQt/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu- \
-sysroot $HOME/amboxQt/rootfs \
-nomake examples -nomake tests -no-use-gold-linker \
-prefix /usr/local/amqt-5127-egl \
-extprefix $HOME/amboxQt/amqt-5127-egl \
-hostprefix $HOME/amboxQt/amqt5127-egl-host \
-skip qtlocation -skip qtscript -skip qtpurchasing \
-skip qttranslations -skip qtvirtualkeyboard -skip qt3d \
-skip qtgamepad -skip qtcharts -skip qtconnectivity \
-skip qtdatavis3d -skip qtsensors -skip qtspeech \
-skip qtwebview -skip qtscxml -skip qtxmlpatterns \
-skip qtandroidextras -skip qtcanvas3d \
-skip qtmacextras -skip qtwinextras -skip qtwayland

Config Summary:

Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
Building for: devices/linux-khadas-edge-g++ (arm64, CPU features: neon)
Target compiler: gcc 7.4.1
Configuration: cross_compile compile_examples enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 concurrent dbus reduce_exports stl
Build options:
  Mode ................................... release
  Optimize release build for size ........ no
  Building shared libraries .............. yes
  Using C standard ....................... C11
  Using C++ standard ..................... C++14
  Using ccache ........................... no
  Using gold linker ...................... no
  Using new DTAGS ........................ yes
  Using precompiled headers .............. yes
  Using LTCG ............................. no
  Target compiler supports:
    NEON ................................. yes
  Build parts ............................ libs
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... yes
  Qt D-Bus directly linked to libdbus .... yes
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... yes
  udev ................................... yes
  Using system zlib ...................... yes
Qt Core:
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ yes
  GLib ................................... yes
  iconv .................................. no
  ICU .................................... yes
  Tracing backend ........................ <none>
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  Using system PCRE2 ..................... no
Qt Network:
  getifaddrs() ........................... yes
  IPv6 ifname ............................ yes
  libproxy ............................... no
  Linux AF_NETLINK ....................... yes
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
  OpenSSL 1.1 ............................ yes
  DTLS ................................... yes
  SCTP ................................... no
  Use system proxies ..................... yes
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ yes
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ yes
  Fontconfig ............................. yes
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... yes
    PNG .................................. yes
      Using system libpng ................ yes
  EGL .................................... yes
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... no
    OpenGL ES 2.0 ........................ yes
    OpenGL ES 3.0 ........................ yes
    OpenGL ES 3.1 ........................ yes
    OpenGL ES 3.2 ........................ yes
  Vulkan ................................. no
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. yes
  libinput ............................... yes
  INTEGRITY HID .......................... no
  mtdev .................................. yes
  tslib .................................. yes
  xkbcommon .............................. yes
  X11 specific:
    XLib ................................. yes
    XCB Xlib ............................. yes
    EGL on X11 ........................... no
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. yes
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    EGLFS EGLDevice ...................... yes
    EGLFS GBM ............................ yes
    EGLFS VSP2 ........................... no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGLFS X11 ............................ no
  LinuxFB ................................ yes
  VNC .................................... yes
  Mir client ............................. no
Qt Sql:
  SQL item models ........................ yes
Qt Widgets:
  GTK+ ................................... no
  Styles ................................. Fusion Windows
Qt PrintSupport:
  CUPS ................................... yes
Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. no
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... yes
  PostgreSQL ............................. yes
  SQLite2 ................................ no
  SQLite ................................. yes
    Using system provided SQLite ......... no
  TDS (Sybase) ........................... yes
Qt Testlib:
  Tester for item models ................. yes
Qt SerialBus:
  Socket CAN ............................. yes
  Socket CAN FD .......................... yes
Further Image Formats:
  JasPer ................................. no
  MNG .................................... yes
  TIFF ................................... yes
    Using system libtiff ................. yes
  WEBP ................................... yes
    Using system libwebp ................. no
Qt QML:
  QML network support .................... yes
  QML debugging and profiling support .... yes
  QML sequence object .................... yes
  QML list model ......................... yes
  QML XML http request ................... yes
  QML Locale ............................. yes
  QML delegate model ..................... yes
Qt Quick:
  Direct3D 12 ............................ no
  AnimatedImage item ..................... yes
  Canvas item ............................ yes
  Support for Qt Quick Designer .......... yes
  Flipable item .......................... yes
  GridView item .......................... yes
  ListView item .......................... yes
  TableView item ......................... yes
  Path support ........................... yes
  PathView item .......................... yes
  Positioner items ....................... yes
  Repeater item .......................... yes
  ShaderEffect item ...................... yes
  Sprite item ............................ yes
Qt Quick Controls 2:
  Styles ................................. Default Fusion Imagine Material Universal
Qt Quick Templates 2:
  Hover support .......................... yes
  Multi-touch support .................... yes
Qt Multimedia:
  ALSA ................................... yes
  GStreamer 1.0 .......................... yes
  GStreamer 0.10 ......................... no
  Video for Linux ........................ yes
  OpenAL ................................. no
  PulseAudio ............................. yes
  Resource Policy (libresourceqt5) ....... no
  Windows Audio Services ................. no
  DirectShow ............................. no
  Windows Media Foundation ............... no
Qt Tools:
  QDoc ................................... no
Qt WebEngine:
  Embedded build ......................... yes
  Full debug information ................. no
  Pepper Plugins ......................... no
  Printing and PDF ....................... no
  Proprietary Codecs ..................... no
  Spellchecker ........................... yes
  Native Spellchecker .................... no
  WebRTC ................................. no
  Use System Ninja ....................... no
  Geolocation ............................ no
  WebChannel support ..................... yes
  Use v8 snapshot ........................ yes
  Kerberos Authentication ................ no
  Support qpa-xcb ........................ no
  Building v8 snapshot supported ......... yes
  Use ALSA ............................... yes
  Use PulseAudio ......................... yes
  Optional system libraries used:
    re2 .................................. no
    icu .................................. no
    libwebp, libwebpmux and libwebpdemux . no
    opus ................................. no
    ffmpeg ............................... no
    libvpx ............................... no
    snappy ............................... no
    glib ................................. yes
    zlib ................................. yes
    minizip .............................. no
    libevent ............................. no
    jsoncpp .............................. no
    protobuf ............................. no
    libxml2 and libxslt .................. yes
    lcms2 ................................ no
    png .................................. yes
    JPEG ................................. yes
    harfbuzz ............................. yes
    freetype ............................. yes
  Required system libraries:
    fontconfig ........................... yes
    dbus ................................. yes
    nss .................................. yes
    khr .................................. yes
    glibc ................................ yes
  Required system libraries for qpa-xcb:
    x11 .................................. no
    libdrm ............................... yes
    xcomposite ........................... no
    xcursor .............................. no
    xi ................................... no
    xtst ................................. no

Note: Also available for Linux: linux-clang linux-icc

Note: PKG_CONFIG_LIBDIR automatically set to /home/uzisky/amboxQt/rootfs/usr/lib/pkgconfig:/home/uzisky/amboxQt/rootfs/usr/share/pkgconfig:/home/uzisky/amboxQt/rootfs/usr/lib/aarch64-linux-gnu/pkgconfig

Note: PKG_CONFIG_SYSROOT_DIR automatically set to /home/uzisky/amboxQt/rootfs

WARNING: QDoc will not be compiled, probably because libclang could not be located. This means that you cannot build the Qt documentation.

Either ensure that llvm-config is in your PATH environment variable, or set LLVM_INSTALL_DIR to the location of your llvm installation.
On Linux systems, you may be able to install libclang by installing the libclang-dev or libclang-devel package, depending on your distribution.
On macOS, you can use Homebrew's llvm package.
On Windows, you must set LLVM_INSTALL_DIR to the installation path.

Please, how can I fix this or what are the tried and tested way to make QtWebengine work on Arm64?

[[qanda:topic_unsolved]] Android-Project ERROR: Unknown module(s) in QT: webenginewidgets

$
0
0

QtWebEngine - Android-Project ERROR: Unknown module(s) in QT: webenginewidgets

I built a Qt 5 application project on Android including webenginewidgets module. But I got a error as follows.

/Qt/5.13.1/android_arm64_v8a/bin/qmake -o Makefile ../videoplayer/videoplayer.pro -spec android-clang CONFIG+=qtquickcompiler
Project ERROR: Unknown module(s) in QT: webenginewidgets

Refer to https://doc.qt.io/qt-5/android.html

It says "Qt for Android enables you to run Qt 5 applications Android devices. All Qt modules (essential and add-on) are supported except Qt WebEngine."

But on Qt maintenance Tool it only indicates that webengine component, "On Windows, the module is only available under MSVC 2017".

I want to build a Qt 5 application project on Android including webenginewidgets module.
Is there any other method? Or Will Qt support webenginewidgets module in the future version?


[[qanda:topic_unsolved]] Esri web map

$
0
0

Hi,
why in the QWebEngine (Qml and QWidget) I see a blank screen for a Web Esri Map instead with the browser anything it's ok?
Thanks

[[qanda:topic_unsolved]] Help to do my idea

$
0
0

Hello, today i test QWebEngine module to make Web Browser, and i would like to make menu similar to the actual gnome 3 menu in the left (similar to Ubuntu style), and when mouse isn't into this menu, this menu disappear.
But how can i do that ? Is it possible to show picture into WebView, or i need to some other widgets ? What is your advice ?

[[qanda:topic_unsolved]] Offscreen rendering does not work with Qt 5.13 / 5.14

$
0
0

Hi,
I'm working on an application which captures the contents of a QWebEngine and renderes it to a texture.
The original window of the QWebEngineView is hidden with setAttribute(Qt::WA_DontShowOnScreen).

We use this to map web content to 3D objects. This used to work fine with Qt 5.12. Starting with 5.13 it does not work anymore. I've tried to build now with several versions up to 5.14.1.

As soon as the window is hidden, the webengine does not receive any updates. I can also reproduce this by not setting the WA_DontShowOnScreen flag and then just minimize the window at runtime. This also breaks update.
So far I've not been able to find any workaround to get the updates back.

Thanks for any help!

[[qanda:topic_unsolved]] qFatal: Could not find QtWebEngineProcess

$
0
0

I am having issues with a few errors regarding QWebEngine. I currently have a locally built version of Qt that sits in a folder at D:/BuiltLibraries and a folder for all of our built libraries in D:/Libraries. Currently, my locally built version of Qt sits in both.

I can build and run everything just fine. When others pull down the repository they can build everything but when they actually go to run the application they get one of the following errors:

qFatal: Could not find QtWebEngineProcessd.exe
or
qFatal: Could not find QtWebEngineProcess.exe

If I rename my D:/BuiltLibraries to something different I get the same error even though it's building with the copy of the library in D:/Libraries.

The repository that I am building is in D:/Repos/<repo> and builds to folders in there that are generated by Visual Studio. I've tried adding a qt.conf to the folder where the applications .exe is as well as adding a qt.conf file to the Qt library in D:/Libraries and can't seem to be able to get it to work.

When we build a installed version of our application we get a bunch of qWarnings saying it can't find the ICU data in D:/BuiltLibraries/Qt/resources. It at least falls back on the directory the .exe is located and finds everything and runs.

It seems that when Qt is built it hardcodes a path to look for what it needs. Is there a way to work around this issue in our build environment?

[[qanda:topic_unsolved]] Unrecognized Chrome version when using Selenium (python bindings) and chromedriver

$
0
0
Is this really the only solution? I don't have the luxury of changing my application name and version unfortunately. There must be some way to just change the browser name or something like that. I also noticed that this wasn't an issue in Qt version 5.9.7 (the last version we were at). In that version of QtWebEngine, the Browser name just came across as "" so chromedriver didn't check.

[[qanda:topic_unsolved]] How to add widgets to QWebEngineView?

$
0
0

Hi,
I.am customizing a web browser,
but when I want to add some widgets to my QWebENgineVIew,
I have to resize the widget every time before it shows.


MyWebEngineView::MyWebEngineView(*parent) : QWebEngineView(parent)
{
	QVBoxLayout* layout = qobject_cast<QVBoxLayout*>(this->layout());
	qDebug() << layout;
	if (nullptr == layout) {
		layout = new QVBoxLayout(this);
	}
	layout->setSpacing(0);
	QToolBar* toolBar = createToolBar();
	layout->addWidget(toolBar);
	progressBar = new QProgressBar(this);
	progressBar->setMaximumHeight(1);
	progressBar->setTextVisible(false);
	progressBar->setStyleSheet(QStringLiteral("QProgressBar {border: 0px} QProgressBar::chunk {background-color: #da4453}"));
	layout->addWidget(progressBar);

	this->extendToolWidget = new QWidget(this);
	this->extendToolWidget->hide();
	layout->addWidget(this->extendToolWidget);
}
    MyWebView *webView = new MyWebView;
    MyWebPage *webPage = new MyWebPage(QWebEngineProfile::defaultProfile(), webView);
    webView->setPage(webPage);

    setupView(webView);
    webView->resize(currentWidget()->size());
    webView->show();

and when I show this widget , I can see my tool bar move from center to top, rather than always on the top.

so what can i do to make my tool ba stay on the top, Thank you.

[[qanda:topic_unsolved]] Gui is blocking animated content of the QWebEngineView

$
0
0

I write a QtWidgets application that contains the QWebEngineView as a GUI component in order to display some HTML/JavaScript animated charts. The problem is that the animation is not displayed properly. The content is blocked at the begining and its final form is displayed after clicking some button, changing tab etc. - namely, after a GUI event.

My idea was to somehow create a QWebEngineWidget that is run in a separate thread. Is that possible?

Than you for any suggestions.


[[qanda:topic_unsolved]] Render process exited with code: 40

$
0
0

I run the webenginewidgets example simplebrowser in Qt 5.14, compile with VS2017. After the browser window show for a while, the web page can not been shown in the window. And then, a dialog box popup, it says "Render process exited with code: 40". I don't know what does this code mean and how to solve this problem? Is there any thing need to configure before compiling? How to generate the log file of QtWebEngineProcess.exe?
The system information of my computer:
os: Win7 64-bit
cpu: Intel i5-6500
Graphics card: Intel(R) HD Graphics 530

[[qanda:topic_unsolved]] QWebEngineView How to open new tab link in same tab?

$
0
0
A long time ago I solved a similar problem in SO (see this answer for more information) and the logic was to create a new QWebEnginePage, get the url, set it to the original QWebEnginePage and delete the new QWebEnginePage. #include <QtWebEngineWidgets> class WebEnginePage: public QWebEnginePage{ Q_OBJECT public: using QWebEnginePage::QWebEnginePage; protected: QWebEnginePage *createWindow(WebWindowType ){ WebEnginePage *page = new WebEnginePage(this); connect(page, &QWebEnginePage::urlChanged, this, &WebEnginePage::onUrlChanged); return page; } private Q_SLOTS: void onUrlChanged(const QUrl & url){ if(WebEnginePage *page = qobject_cast<WebEnginePage *>(sender())){ setUrl(url); page->deleteLater(); } } }; int main(int argc, char *argv[]) { QApplication a(argc, argv); QWebEngineView view; view.setPage(new WebEnginePage(&view)); view.load(QUrl(QStringLiteral("https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_a_target"))); view.resize(640, 480); view.show(); return a.exec(); } #include "main.moc"

[[qanda:topic_unsolved]] Pyside2 toHtml()?

$
0
0
UPDATE: I see https://bugreports.qt.io/browse/PYSIDE-946 has just moved to In Progress, which is good news.

[[qanda:topic_unsolved]] webengine for Risc-v

$
0
0

I am tring to cross-compile QT to Risc-v, why jump over webengine?
When we can get webengine for Risc-v?

[[qanda:topic_unsolved]] How to get the return value synchronously, when invoking a slot method with qwebchannel.js?

$
0
0
I am also in need to sync call from JS side to c++ side using QWebChannels. I have a list which populates and then i need to serve it to the JS side. How should i do it ?
Viewing all 13965 articles
Browse latest View live