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

Unsolved QWebEngineView fails

$
0
0

I am trying to convert my application to use QWebEngineView instead of QWebView. I have successfully gotten the upgraded app to run with no problems on Ubuntu (12.04) and Qt 5.7.0. However, on Windows 7, and Qt 5.7.0, I get these errors and nothing is displayed in the widget:

I am using MSVC2013. Both the 32 bit and 64 bit versions of QT fail in the same way

[0730/151202:ERROR:scoped_ole_initializer.cc(20)] Multiple OleInitialize() calls for thread 1176
.
.
.
[0730/151328:ERROR:gles2_cmd_decoder.cc(2109)] [.CommandBufferContext.RenderWorker-0000000004279B90]GL ERROR :GL_INVALID_ENUM : BackFramebuffer::Destroy: <- error from previous GL command
[0730/151329:ERROR:gles2_cmd_decoder.cc(2109)] [GroupMarkerNotSet(crbug.com/242999)!:A87AC13300000000]GL ERROR :GL_INVALID_ENUM : BackFramebuffer::Destroy: <- error from previous GL command

I have successfully compiled and executed the Qt example demobrowser app so I don't think there is a problem with my Windows or QT environment.

Update: I just compiled my app under 5.6.1 and there are no problems; the app works as expected so this problem only exists in 5.7.0 and Windows MSCV2013.

Can anybody give me a clue as to what the problem may be?


Unsolved QWebEnginePage setContent does not render SVG data

$
0
0

I use the following to set the page's content and rather than render the svg data it simply displays it as text.

    array = QByteArray().append(content)
    self.mapView.page().setContent(array, mimeType=str('text/svg+xml'))

Anyone know how to actually make it render with setContent?

[[topic:topic_is_deleted]]

$
0
0

webEngine webchannelTransport 5.7.0

Unsolved Need help to compiled QT 5.7.0 webEngine module with webChannelTransport problem fixed

$
0
0

Have trouble to build the QT 5.7.0 webEngine module, we need 5.7.0 to fix a memory
leak problem in 5.6 when playing H5 webM video.
Need the QT 5.7.0 webEngine module with the patch https://bugreports.qt.io/browse/QTBUG-53411 merged.
Thanks for the hlp

Unsolved Need help to build WebEngine module

$
0
0

Have trouble to build WebEngine module. Need to compile the 5.7.0 branch with the https://bugreports.qt.io/browse/QTBUG-53411 patch applied. We have memory leak problem with QT 5.6.0 when we use video tag to play WebM format video.

We used the following batch file to build the module but failed with many errors:
set MSVC_PATH=C:\Program Files (x86)\Microsoft Visual Studio 12.0
set QMAKESPEC=win32-msvc2013
set QT5_SRC_PATH=D:\qt-everywhere-opensource-src-5.7.0
set QT5_INSTALL_PATH=D:\Qt\Qt5.7.0-win32-vs2013-web
set PERL_PATH=C:\Perl64
set PYTHON_PATH=C:\Python35
set RUBY_PATH=C:\Ruby23-x64
set WIN_FLEX_BISION_PATH=%QT5_SRC_PATH%\gnuwin32\bin
set ICU_PATH=C:\icu
set OPENSSL_PATH=C:\usr\local\ssl
set PATH=%QT5_SRC_PATH%\qtbase\bin;%QT5_SRC_PATH%\qtbase\lib;%QT5_SRC_PATH%\gnuwin32\bin;%RUBY_PATH%\bin;%PATH%
set PATH=%PATH%;%PERL_PATH%\bin;%PYTHON_PATH%
set LIB=%LIB%;%ICU_PATH%\lib;%OPENSSL_PATH%\lib
set INCLUDE=%INCLUDE%;%ICU_PATH%\include;%OPENSSL_PATH%\include
set PATH=%PATH%;%ICU_PATH%\bin;%OPENSSL_PATH%\bin;%ICU_PATH%\lib
call "%MSVC_PATH%\VC\vcvarsall.bat" x86
call %QT5_SRC_PATH%\configure -prefix %QT5_INSTALL_PATH% -debug-and-release -opensource -confirm-license -platform win32-msvc2013 -target xp -opengl dynamic -mp -icu -openssl -nomake examples -nomake tests -no-directwrite
nmake
nmake install
xcopy /y /k "%ICU_PATH%\bin\icudt56.dll" "%QT5_INSTALL_PATH%\bin"
xcopy /y /k "%ICU_PATH%\bin\icuin56.dll" "%QT5_INSTALL_PATH%\bin"
xcopy /y /k "%ICU_PATH%\bin\icuuc56.dll" "%QT5_INSTALL_PATH%\bin"
xcopy /y /k "%ICU_PATH%\lib\icudt.lib" "%QT5_INSTALL_PATH%\lib"
xcopy /y /k "%ICU_PATH%\lib\icuin.lib" "%QT5_INSTALL_PATH%\lib"
xcopy /y /k "%ICU_PATH%\lib\icuuc.lib" "%QT5_INSTALL_PATH%\lib"
xcopy /y /k "%OPENSSL_PATH%\bin\libeay32.dll" "%QT5_INSTALL_PATH%\bin"
xcopy /y /k "%OPENSSL_PATH%\bin\ssleay32.dll" "%QT5_INSTALL_PATH%\bin"
xcopy /y /k "%OPENSSL_PATH%\lib\libeay32.lib" "%QT5_INSTALL_PATH%\lib"
xcopy /y /k "%OPENSSL_PATH%\lib\ssleay32.lib" "%QT5_INSTALL_PATH%\lib"
pause

Please help. Thank you for the help.

Unsolved How to make qwebengineview support fullscreen?

Windows authentication not working with QtWebEngine

$
0
0

Hi and welcome to devnet,

That's a question you should bring to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

Unsolved How to install QtWebEngine

$
0
0

Hi,

Which version of Qt did you install ?


Unsolved Send Mouse Click to WebEngineView

$
0
0

I am clicking a WebAutomation tool,I would like to know how I could send mouse events to the WebEngineView.
Here are some things I have tried but haven't work.

event= createMouseEvent(QEvent::MouseButtonPress, QPoint(mouse_x,mouse_y), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier);
QApplication::instance()->sendEvent(view,event);

and

QTestEventList eventos;
eventos.addMouseClick(Qt::LeftButton, 0, QPoint(mouse_x,mouse_y), -1);
    eventos.simulate(view);

where view is a QWebEngine View.
I know that one can use javascript methods for clicking .But i would like to provide the user with a method of using mouse coordinates instead.

i would prefer a solution thats cross platform and can work when the window is minimised or not in view.

A noob friendly explanation will be greatly apprecieated.
Please help.
Thanks in advance.

Unsolved QtWebEngineProcess.exe immediately crashing on some PCs

$
0
0

Okay, after four days of research, turns out the specific DLL - Qt5WebEngineCore.dll doesn't like being compressed by UPX. It's not noticeable immediately, but on approx. 10 % of PCs the QtWebEngineProcess simply crashes.

Unsolved QtWebEngine problem allow camera Qt5.6

$
0
0

Because in QtWebEngine 5.6 the onFeaturePermissionRequested does not work anymore? I can not release microphone and camera using this slot.
I tested on ARM Cortex-A9 as Desktop.

Unsolved application exe memory and qtwebengineprocess.exe memory

$
0
0

I'm running an application with the code below. I'm noticed that if I spam resizing the app even if its drawing nothing, I see my main application memory usage go up. I start off with a 1GB of free memory and if i constantly resize and maximize, i will eventually use that up and possibly crash the render process. If I stop spamming the resizing, the memory usually frees up some but never returns to the levels I started at. If the render process crashes, I get the 1GB I started with back. Can anyone explain or having any thoughts on what I'm seeing?

Thanks

    QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); // DPI support
    
    QApplication app(argc, argv);

    QWebEngineView view;
    view.setUrl(QUrl(QStringLiteral("http://a.dilcdn.com/bl/wp-content/uploads/sites/6/2016/01/sullust_04-2400x1200-795653638057.jpg")));
    view.resize(1024, 750);
    view.show();

    return app.exec();

Unsolved Qt 5.7: QtWebEngineWidgets not working on Linux

$
0
0

Hi all,

I am currently trying to build Qt5 + QtWebEngine for PyQt5 in
a conda environment.

Most components (e.g., QtWidgets) work as expected but I have problems
getting QtWebEngine(Widgets) to work.

I will first show the errors I got and then how I built Qt5.7.

My issues

The first issue I had was that the file icudtl.dat was missing. It should
have been installed into share/qt5/resources/icudtl.dat but was not. I got
this error and then the app crashed:

Qt WebEngine ICU data not found at /home/stefan/pydist/envs/qttest/share/qt5/resources. Trying parent directory...
Qt WebEngine ICU data not found at /home/stefan/pydist/envs/qttest/share/qt5. Trying application directory...
Qt WebEngine ICU data not found at /home/stefan/pydist/envs/qttest/bin. Trying fallback directory... The application MAY NOT work.
Installed Qt WebEngine locales directory not found at location /home/stefan/pydist/envs/qttest/share/qt5/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine locales directory not found at location /home/stefan/pydist/envs/qttest/bin/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
[0822/102244:ERROR:icu_util.cc(162)] Invalid file descriptor to ICU data received.
[0822/102244:FATAL:content_main_runner.cc(714)] Check failed: base::i18n::InitializeICU().

After I copied the file from
qt-everywhere-opensource-src-5.7.0/qtwebengine/src/3rdparty/chromium/third_party/icu/source/data/in/icudtl.dat,
I got a new errors. The app did not crash but instead of the rendered HTML
I more or less get the raw HTML (see this screenshot:
https://imgur.com/a/CKRpQ):

Installed Qt WebEngine locales directory not found at location /home/stefan/pydist/envs/qttest/share/qt5/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine locales directory not found at location /home/stefan/pydist/envs/qttest/bin/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
Qt WebEngine resources not found at /home/stefan/pydist/envs/qttest/share/qt5/resources. Trying parent directory...
Qt WebEngine resources not found at /home/stefan/pydist/envs/qttest/share/qt5. Trying application directory...
Qt WebEngine resources not found at /home/stefan/pydist/envs/qttest/bin. Trying fallback directory... The application MAY NOT work.
[0822/104459:ERROR:resource_bundle.cc(720)] Failed to load /home/stefan/.qttest.py/qtwebengine_resources.pak
Some features may not be available.
[0822/104459:ERROR:resource_bundle.cc(720)] Failed to load /home/stefan/.qttest.py/qtwebengine_resources_100p.pak
Some features may not be available.
[0822/104459:ERROR:resource_bundle.cc(720)] Failed to load /home/stefan/.qttest.py/qtwebengine_resources_200p.pak
Some features may not be available.
[0822/104459:ERROR:resource_bundle.cc(720)] Failed to load /home/stefan/.qttest.py/qtwebengine_devtools_resources.pak
Some features may not be available.
[0822/104459:WARNING:resource_bundle.cc(311)] locale_file_path.empty() for locale
[0822/104459:ERROR:browser_main_loop.cc(217)] Running without the SUID sandbox! See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the sandbox on.
Installed Qt WebEngine locales directory not found at location /home/stefan/pydist/envs/qttest/share/qt5/translations/qtwebengine_locales. Trying application directory...
Qt WebEngine locales directory not found at location /home/stefan/pydist/envs/qttest/lib/qt5/libexec/qtwebengine_locales. Trying fallback directory... Translations MAY NOT not be correct.
Qt WebEngine resources not found at /home/stefan/pydist/envs/qttest/share/qt5/resources. Trying parent directory...
Qt WebEngine resources not found at /home/stefan/pydist/envs/qttest/share/qt5. Trying application directory...
Qt WebEngine resources not found at /home/stefan/pydist/envs/qttest/lib/qt5/libexec. Trying fallback directory... The application MAY NOT work.
[0822/104459:ERROR:resource_bundle.cc(720)] Failed to load /home/stefan/.QtWebEngineProcess/qtwebengine_resources.pak
Some features may not be available.
[0822/104459:ERROR:resource_bundle.cc(720)] Failed to load /home/stefan/.QtWebEngineProcess/qtwebengine_resources_100p.pak
Some features may not be available.
[0822/104459:ERROR:resource_bundle.cc(720)] Failed to load /home/stefan/.QtWebEngineProcess/qtwebengine_resources_200p.pak
Some features may not be available.
[0822/104459:ERROR:resource_bundle.cc(720)] Failed to load /home/stefan/.QtWebEngineProcess/qtwebengine_devtools_resources.pak
Some features may not be available.
[0822/104459:WARNING:resource_bundle.cc(311)] locale_file_path.empty() for locale

It looks again as if some required data files did not get installed, although
this time, the errors don’t lead to a crash. There’s also the error
[0822/104459:ERROR:browser_main_loop.cc(217)] Running without the SUID sandbox! See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md
for more information on developing with the sandbox on.

So my two main issues I could not yet find a solution for:

1. How to I get the required resources to be installed into share/qt5?
2. How to I fix the sandboxing issue with Chromium?

How I built Qt5

My base build system is Centos 7.

I installed the following requirements system system wide:

$ yum groupinstall 'Development Tools'
$ yum install mesa-libGL-devel libX11-devel libXext-devel libXfixes-devel libXi-devel libXrender-devel libxcb-devel
$ yum install bison flex gperf

The remaining requirements were installed as Conda packages:

  • fontconfig
  • freetype
  • libicu (I tried it with and without this lib as it is also bundled with the
    Chromium that is bundles with Qt 5.7)
  • libjpeg
  • libmysqlclient
  • libpng
  • openssl
  • xz
  • zlib

I applied two patches to Qt5 to fix an issue with libjpeg9 and glibc:

The Conda build.sh (the build script) looks like this (it is largely based on
this recipe):

# Main variables
# --------------
BIN=$PREFIX/lib/qt5/bin
QTCONF=$BIN/qt.conf
VER=$PKG_VERSION
CXXFLAGS=-fno-delete-null-pointer-checks


# Compile
# -------
chmod +x configure

# This might only work on Linux.  Check
# https://github.com/conda/conda-recipes/tree/master/qt5 for OS X support

MAKE_JOBS=$CPU_COUNT

./configure -prefix $PREFIX \
            -libdir $PREFIX/lib \
            -bindir $PREFIX/lib/qt5/bin \
            -headerdir $PREFIX/include/qt5 \
            -archdatadir $PREFIX/lib/qt5 \
            -datadir $PREFIX/share/qt5 \
            -L $PREFIX/lib \
            -I $PREFIX/include \
            -verbose \
            -release \
            -opensource \
            -confirm-license \
            -shared \
            -nomake examples \
            -nomake tests \
            -qt-pcre \
            -qt-xcb \
            -qt-xkbcommon \
            -dbus \
            -optimized-qmake

LD_LIBRARY_PATH=$PREFIX/lib make -j $MAKE_JOBS
make install


# Post build setup
# ----------------

# Remove unneeded files
rm -rf $PREFIX/share/qt5

# Make symlinks of binaries in $BIN to $PREFIX/bin
for file in $BIN/*
do
    ln -sfv ../lib/qt5/bin/$(basename $file) $PREFIX/bin/$(basename $file)-qt5
done

# Remove static libs
rm -rf $PREFIX/lib/*.a

# Add qt.conf file to the package to make it fully relocatable
cp $RECIPE_DIR/qt.conf $BIN/

As I said before, this mostly works quite well except that the ICU data for
Qt5 / QtWebEngine is not packaged/installed and that Chromium has these
sandboxing issues.

Summary

I did a lot of research during the last two weaks and re-compiled qt5 many
times. I made some progress and got it mostly working, but two issues still
remain:

1. How to I get the required resources to be installed into share/qt5?
2. How to I fix the sandboxing issue with Chromium?

I am stucked and have not yet found any solutions for them.

Unsolved Qt 5.7 Multiply web views and subsystem:console

$
0
0

Hi, i have next simple code:

#include <QtWidgets/QApplication>
#include <QtWebEngineWidgets/QWebEngineView>

int main(int argc, char *argv[])
{ 
#ifdef QT_DEBUG
    qputenv("QTWEBENGINE_REMOTE_DEBUGGING", "23654");
    #pragma comment(linker, "/subsystem:console")
#endif

    QApplication application(argc, argv);

    QWebEngineView view1_;
    view1_.load(QUrl("http://google.com"));
    QWebEngineView view2_;
    view2_.load(QUrl("http://google.com"));
    QWebEngineView view3_;
    view3_.load(QUrl("http://google.com"));
    QWebEngineView view4_;
    view4_.load(QUrl("http://google.com"));

    return application.exec();
}

I use subsystem:console for seeing debug messages. If i close console window I am getting next assert error: http://prntscr.com/c9034s
It reproduces really often. Is it Qt bug, or I don't know some rules of creating multiply web views?

Thanks.

Unsolved Manipulating QtWebEngine printToPdf()

$
0
0

Hi,

since QtWebEngine now has a method to render web pages to PDF files we would gladly switch to this method instead of printing html content via a TextDocument.

One thing that is currently missing in this workflow is the possibility to add static data to the printed PDF pages (like headers and footers on every page). What would be a good approach to this using printToPdf()?

Thanks!


Unsolved Build QTWebEngine from Qt out of devel rpms for centos 6.6

$
0
0

Hallo,

I have a Little Problem to build qtwebengine 5.5.1 from qtwebengine-opensource-src-5.5.1.tar.gz on Centos 6.6.
I have installed the binary and devel Packages of QT 5.5.1 from RPMs of a given repository.
Then I install the red hat devtoolset-2 to get the G++ 4.8 Compiler which is necessary to build the qtwebengine.
Than I start qmake and I get the following Output:

Using gcc Version 4.4, but at least gcc Version 4.7 is required to build Qt WebEngine.
QtWebEngine will not be built.

What can I do? I think the binary and devel rpms are build with gcc/g++ 4.4 and this is the Problem.
How can I solve the Problem?

Sincerely

Klaus

Unsolved How to send QString to server in Qt 5.6?

$
0
0

Before, when I was using Qt 5.5, I could send network requests this way:

QString jsonString = "Some string info";
uploadManager = new QNetworkAccessManager(this);
QNetworkRequest rqData (theApp->getDomain() + "PageOnServerName.php"); 
rqData.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); 
QNetworkReply * r = uploadManager->post(rqData, jsonString.toLatin1());
QEventLoop loop; 
QTimer::singleShot(std::max(10u,timeout_msecs),&loop,SLOT(quit())); 
r->connect(r, SIGNAL(finished()), &loop, SLOT(quit())); 
r->connect(r, SIGNAL(error(QNetworkReply::NetworkError)), &loop, SLOT(quit())); 
loop.exec();

But right now it doesn't seem to work anymore. Server doesn't get any information

Unsolved Need help to compiled QT 5.7.0 webEngine module with webChannelTransport problem fixed

$
0
0

webEngine webchannelTransport 5.7.0

CSS 3D transform: QtWebEngine (Qt 5.5) vs CEF3

Unsolved Need to signal/trigger/call/whatever from WebEngineView content...

$
0
0

...into my Qml code.

I've been reading on this and was quite surprised to find that window.postMessage doesn't exist, the Qt JavaScript bridge no longer works, and that WebChannel solutions appear to require that the page (which I do not control) must include a bunch of Qt specific JavaScript.

Is there a way for the HTML/JS content of a page viewed in a WebEngineView to signal my Qml code?

If I'm signalled I can run an eval against the page content and pull the data I need - but I can't find a way to trigger this except when a pageload completed event happens (and by this time it's too late.)

Suggestions? Thanks!

Viewing all 13965 articles
Browse latest View live