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

Unsolved Deplying - ffmpegsumo?

$
0
0

Hello,

I read on https://doc.qt.io/qt-5/qtwebengine-deploying.html that in order to support WebM, I must ship ffmpegsumo.dll

However, in newer versions of Qt, that file is not present anywhere and apparently webm seems to work in QtWebEngine sample applications

Is the documentation outdated?


Unsolved How to use QWebEngine to intercept HTML get the post data?

$
0
0

In QtWebKit we can use QNetworkAccessManager, like:```
//code
class NetworkAccessManager : public QNetworkAccessManager
{
public:
explicit NetworkAccessManager(QNetworkAccessManager *manager, QObject *parent);
protected:
QNetworkReply * createRequest(QNetworkAccessManager::Operation operation,const QNetworkRequest &request, QIODevice *device);
};

We can implement QNetworkReply * createRequest(). In this method we can get:
operation (QNetworkAccessManager::Operation operation)
request (const QNetworkRequest &request)
post data (QIODevice *device)
From request we can get the url, from post data  we can get  data from html (maybe other operation also have this data).

In QtWebEngine we can use QWebEngineUrlRequestInterceptor to get operation and url, like:```
//code
class WebUrlRequestInterceptor : public QWebEngineUrlRequestInterceptor
{
public:
    WebUrlRequestInterceptor(QObject *p = Q_NULLPTR);
    void interceptRequest(QWebEngineUrlRequestInfo &info);
    ~WebUrlRequestInterceptor();
};

We can implement interceptRequest(QWebEngineUrlRequestInfo &info), in this method we have info, from info we can get
operation (info.requestMethod)
url (info.requestUrl)
Now I want to get post data, how can I get it?
help!!!!! thank you

Solved Problem using QWebEngine on virtual machine

$
0
0

@pmh4514

I received an answer from Qt support, it solved the problem. Their answer below:

On a virtual machine the OpenGL support might not be enough for rendering Qt WebEngine, so the quickest way to check if this is the case here is to do:

set QT_OPENGL=angle

on the command line or add:

QGuiApplication::setAttribute(Qt::AA_UseOpenGLES);

before the creation of the application object

Unsolved Supported webengineview libs

Unsolved How to use QWebEngineView::createWindow(QWebEnginePage::WebWindowType type)

$
0
0

How to modify this code so that the new tab links can be accessed in a new tab,I know that this is achieved through createWindow and I have also seen code for the demobrowser but I didn't understood that , this file is .cpp file . Please help , I am just a beginner in qt .

class WebView:public QObject{
    void acceptFullScreen(QWebEngineFullScreenRequest request){
        if(request.toggleOn()){
            request.accept();
            QWidget* w=(QWidget*)this->view->parent();
            this->layout=w->layout();
            this->layout->removeWidget(this->view);
            this->view->setParent(0);
            this->view->showFullScreen();
        }
        else{
            request.accept();
            this->layout->addWidget(this->view);
        }

public:
    char* home_page;
    QWebEngineView* view=new QWebEngineView();
    WebView(char* page=(char*)"file:///home/tarptaeya/Desktop/Crusta_Prototype_python/about.html"){
        this->home_page=page;
        createWebView();
        this->view->settings()->setAttribute(QWebEngineSettings::FullScreenSupportEnabled,true);
        this->view->settings()->setAttribute(QWebEngineSettings::PluginsEnabled,true);
        this->view->settings()->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows,true);
        connect(this->view->page(),&QWebEnginePage::fullScreenRequested,this,&WebView::acceptFullScreen);
    }
    void createWebView(){
        this->view->load(QUrl(this->home_page));
    }
}

Unsolved QWebEngineView crashes immediately especially after scrolling - Qt5.8

Unsolved Application Exit issue

$
0
0

I'm integrating QtWebEngine in my application but I'm having an issue related with application exit.

I've noticed that problem during some application tests, where I have to close the application after loading the web page.
During those tests, If I load a regular web page (ie: http://www.google.com) and quit the application immediately after that, the application takes the same time as it was taking before the integration (+- 5 seconds) but, if I load a local javascript library and quit the application immediately after that, the application takes much more time (80 sec) for exiting.

My code is exactly the same for both kinds of QWebEngineView loads, but I noticed that the application loads more dlls when it loads the javascript library (crypt related, fwpucInt, gpapi, wldal32) and, in both type of loads, when I close the web view QtWebEngineProcess.exe process is immediatly ended.

After some investigation I found that, after loading the js library, if wait some time before exiting the application, the application takes less time to exit. So ... I concluded that after loading the library I have to "wait" (75sec) to exit:

  • If I try to quit the application after loading the library - the application takes 75 sec + 5 seconds (the time exit was taking before the integration) to exit
  • If I try to quit the application N seconds (N < 75) after loading the js library - the application takes (75 seconds - N seconds) + 5 seconds (the time exit was taking before the integration) to exit
  • If I try to quit the application N seconds (N >= 75) after loading the js library - 5 seconds (the time exit was taking before the integration) to exit

How can I reduce that time?
What's causing that time difference? Is it related with qAddPostRoutine(deleteShareContext); ?

https://code.woboq.org/qt5/qtwebengi...lobal.cpp.html

Solved QtWebEngine with Qt Quick 2D Renderer - "Render process exited with code 256"

$
0
0

Make sure that your fonts can be found by fontconfig, e..g. there are fonts in /usr/share/fonts/


Unsolved run_ninja fails when building Qt webengine for Raspberry Pi 3

$
0
0

Hi,
I have a problem that I have been struggling with for weeks. I previously asked about it in qtEmbedded: "How to build Qt for Raspberry Pi3" but did not get a solution. Now I seem to have a very specific problem that hopefully someone will be kind enough to help with.

I finally broke down and followed the instructions in https://github.com/Kukkimonsuta/rpi-buildqt EXACTLY, i.e I started a new Ubuntu16.04LTS VM and a new Jessie Lite. I can build qtbase and other modules BUT when I try to build webengine, it always fails. It is consistently failing at run_ninja failed. I did add an additional dependency in the VM of gperf as my previous question indicated it was required for web engine.

Traceback (most recent call last):
  File "../../3rdparty/chromium/third_party/WebKit/Source/build/scripts/rule_bison.py", line 83, in <module>
    returnCode = subprocess.call([bisonExe, '-d', '-p', prefix, inputFile, '-o', outputCpp])
  File "/usr/lib/python2.7/subprocess.py", line 523, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1343, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
[1030/15771] ACTION //third_party/WebKit/Source/core:m...home/steve/raspi/src/qtwebengine/src/toolchain:target)
ninja: build stopped: subcommand failed.
Makefile.gn_run:335: recipe for target 'run_ninja' failed
make[3]: *** [run_ninja] Error 1
make[3]: Leaving directory '/home/steve/raspi/src/qtwebengine/src/core'
Makefile:78: recipe for target 'sub-gn_run-pro-make_first' failed
make[2]: *** [sub-gn_run-pro-make_first] Error 2
make[2]: Leaving directory '/home/steve/raspi/src/qtwebengine/src/core'
Makefile:75: recipe for target 'sub-core-make_first' failed
make[1]: *** [sub-core-make_first] Error 2
make[1]: Leaving directory '/home/steve/raspi/src/qtwebengine/src'
Makefile:44: recipe for target 'sub-src-make_first' failed
make: *** [sub-src-make_first] Error 2

This is the script calling the build and I installed sub-process chromium and built webchannel when prompted that it was required.

#!/bin/bash

set -e

SCRIPTDIR=$(dirname "$0")
source $SCRIPTDIR/env.sh

SOURCE_DIR=${RPIDEV_SRC}/qtwebengine
cd $SOURCE_DIR

# echo
# echo "== Cleaning previous build =="
# echo
# rm -rf QT_INSTALL_DIR
# rm -rf QT_INSTALL_DIR_HOST

echo
echo "== Configuring qtmultimedia =="
echo
${QT_INSTALL_DIR_HOST}/bin/qmake

echo
echo "== Building qtwebengine  =="
echo
make -j${RPIDEV_JOBS}

echo
echo "== Installing qtwebengine =="
echo
make install

Any help would be GREATLY appreciated.

Unsolved QWebEngineView has error webgl pages on mac pro

$
0
0

Hello,
I have some error initialize webgl pages on mac pro.
but I have no error on windows, mac book air 2012.
So, there is the problem only mac pro.
maybe opengl context create failed internal.

I'm using QWebEngineView. here is simple example.

    QUrl url = QUrl("https://paperplanes.world/");
    _webview = new QWebEngineView();

    auto page = _webview->page();
    page->settings()->setAttribute(QWebEngineSettings::LocalStorageEnabled, true);
    page->settings()->setAttribute(QWebEngineSettings::PluginsEnabled, true);
    page->settings()->setAttribute(QWebEngineSettings::Accelerated2dCanvasEnabled, true);
    page->settings()->setAttribute(QWebEngineSettings::WebGLEnabled, true);

    _webview->showNormal();
    _webview->load(url);

and I have Application output here.

[26155:70403:0417/122744:ERROR:gl_context_cgl.cc(129)] Error creating context.
[26155:70403:0417/122744:ERROR:gl_context_cgl.cc(129)] Error creating context.
[26155:70403:0417/122744:ERROR:gl_context_cgl.cc(129)] Error creating context.
[26155:70403:0417/122744:ERROR:gl_context_cgl.cc(129)] Error creating context.
[26155:70403:0417/122744:ERROR:gl_context_cgl.cc(129)] Error creating context.
[26155:70403:0417/122744:ERROR:gl_context_cgl.cc(129)] Error creating context.
AVDCreateGPUAccelerator: Error loading GPU renderer

and,
alt text

Is there any option in QWebEngineView ?

Unsolved Why is QWebEngineView not ready for mobie apps?

$
0
0
My apps will use some widgets to show web pages. But QTextBrowser just support HTML 4.1, and QtWebView just support QML, and QWebEngineView  just spoport Linux/Unix/MacOSX/Windows. Why does QWebEngineView not support Android and IOS?  It is the reason of Chromium donot support Android and IOS ?
Current mobie apps often use WebView to show web pages, so we can't wait for QWebEngineView. What is the official idea and plan?

Unsolved WebEngine OpenGL implementation is not supported

$
0
0

All,
After much aggravation, I have built QtWebEngine and QtWebView. I need to display static html pages and believe QtWebView is the way to do that - it works on my dev machine. BUT on the Raspberry Pi target, I get a continuous stream of errors when attempting to open an html file. I have build with qmake configured for EGLFS as I do not intend to use Xwindows. The error I get is:

 1295 tty1     00:00:00 QtWebEngineProc
:ERROR:gl_surface_qt.cpp(661)] Requested OpenGL implementation is not supported. Implementation:

I have tried all the GL drivers available in raspi-config (something like full KMS, Fake KMS and legacy no GL). My Qt app fails to run under any of the KMS selections and runs with Legacy but give above mentioned webView error. I installed libgli_mesa_dri on the RPi.

Can anyone help?

Thanks

Unsolved How to use pdf.js with qwebengine

$
0
0

Hello All,
I am learning to make a simple browser with qtwebengine on ubuntu. I also want to display pdf links ( external pdf ) in the browser and found pdf.js is suitable for this purpose. But since I am a newbie I dont know how to work with external pdfs, I have implemented pdf.js for local pdfs but I dont know how to supply the external url to pdf.js and also how to handle CORS in pdf,js with qwebengine.
Any help is highly appreciated.
Thanks and Regards

Unsolved QWebEngineView crashesh if closed after going to fullScreen

$
0
0

I have made a simple implementation of a tabbed webbrowser in qt , when i call a tab to close after the qwebengineview was requested to go fullScreen then the program crashes . Is it a bug of qt or I am doing something incorrectly ?
Thanks and Regards

Unsolved qt 5.6 WebEngine open local html file

$
0
0

Using qrc worked for me (Qt 5.8). Are you sure you added the file to the qml.qrc file?

Should look something like

qml.qrc

<RCC> <qresource prefix="/"> ... <file>minimal/html/index.html</file> </qresource> </RCC>

and in the qml

WebEngineView { anchors.fill: parent url: "qrc:/minimal/html/index.html" }

I believe the url just follows the same scheme as in this S/O answer, so you should also be able to use something like file:///yourpath/minimal/html/index.html


Unsolved QWebEngineView blocking main GUI thread when page has a GIF

$
0
0

@xcoder Hmm, it may be a bug. If you have a reproduceable example than I would submit it and let them check it out. It could just be a webengine issue specifically with MSVC 2015 or something.

My development system with VS2015 on it is a virtual machine but I could test it and see what happens for me. I'm pretty busy right now but I'll do it later this week and let you know what I find.

Unsolved Is there any possible way to add devtools for QWebEngine?

$
0
0

add code:
qputenv("QTWEBENGINE_REMOTE_DEBUGGING", QByteArray::number(9000))

chrome visit:
localhost:9000

Unsolved Java Script failed to create QtQuick 2.5 object

$
0
0

you can find my code

I found the issue, in HTML page, I am loading testJava.js, which causing this issue : <head> <script type="text/javascript" src="testJava.js"></script> </head>

But still why it should have an issue ?

Solved How do I even implement the Web Engine?

$
0
0

Sure, QWebEngineView is a widget like QLabel.

As for Qt Designer, I don't know for QWebEngineView.

AFAIK, it's the default when creating an account however I currently don't know how to change that if it's possible.

Unsolved Qt 5 can't lauch https adresses

$
0
0

I'm using qtwebengine from Qt 5.8.0 on my linux machine and i want to develop a web browser . i read the examples on my version and i successed to launch it using http on localhost but when i set a https on localhost i get a blank webpage i tried :

bool WebPage::certificateError(const QWebEngineCertificateError &error)

But i don't know how to use it , and i get this error :

[12988:13003:0428/122259:ERROR:cert_verify_proc_nss.cc(942)] CERT_PKIXVerifyCert for localhost failed err=-8179

and i want to ignore certificate error

sorry i'm noobs in Qt ! anyone can help me please

Viewing all 13965 articles
Browse latest View live