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

Unsolved Signal when QWebEngineView or its page have completed execution of page JavaScripts?

$
0
0

I am exploring using QWebEngineView to render a particular webpage that contains some JavaScript that alter the page's DOM. When fully rendered I want to print the page. The page loads just fine and the javascripts executes automatically.

I can use the loadFinished() signal to tell when the page is loaded, but I wonder if there is a way to tell when also the javascript has been fully executed?

I am currently using Qt 5.8 and the minimal webenginewidget example as a base.


Unsolved How to Stream live youtube video in qml ?

$
0
0

Hello , how can i view live videostream from youtube in Qtwebview or Qwebengineview ?

when i try i get this error :
alt text

but normal videos play fine

alt text

what should i do ?

Unsolved Scroll a QWebengineView

Unsolved Client certificates? Yikes! I used QtWebEngine because it was built from Chromium

$
0
0

Does it have Chromium's support for local client certs though?

I hope I'm wrong about this, but we've run into this in an Enterprise environment so I set up a local test for the server to request a client certificate from my dev box. Chrome - works. Firefox - works. IE (ugh) - works. Edge - works. QtWebEngine - does not work...

This is a really basic and common security practice throughout Enterprises - surely I'm missing something?

The cert framework just doesn't load them? It seems likely that the cert handling infrastructure would likely already do 99.9% of the work for this - perhaps there was a reason why it's left out?

Thx

Unsolved UHD font rendering problem

$
0
0

I am using KaOS Linux and I have problems with font rendering in UHD.

I am using KaOS Linux and have some problems with font rending with programs using qtwebengine.

Font rending problem exists with larger and smaller system fonts.

Picture of Quipzilla using qtwebengine
Picture of Quipzilla using qtwebengine

Picture of Otter Browser not using qtwebengine
Picture of  Otter Browser not using qtwebengine

Discussions here and here.

Is there a bug open for the problem? I could not find one, but as a simple user, I may have missed it.

Unsolved Change Referrer in QT WebEngine View

$
0
0

I am currently developing a web automation tool, I would like to know how to change the referrer.
By referrer I mean the header variable stored by a browser when it visits a site .This variable usually contains the previous webpage link that lead to that site.

So far I know with the QWebEngineUrlRequestInterceptor one can some how use it in your view but how can you change the referrer.Intuition says adding a HEADER somehow.

     QWebEngineUrlRequestInterceptor *interceptor;
    view->page()->profile()->setRequestInterceptor(interceptor);
    view->page()->profile()->setHttpUserAgent("New User Agent");

Unsolved How do I use Greasemonkey attributes with a WebEngineScript?

$
0
0

The documentation for WebEngineScript says, "The following Greasemonkey attributes are supported since Qt 5.8: @exclude, @include, @name, @match, and @run-at."

But there is no documentation about how to actually do it, and no examples I can find.

Simply including the directives inside the UserScript, like you would with Greasemonkey, has no effect.

Where/how am I supposed to insert/apply Greasemonkey attributes?

Unsolved Set cookie before loading url WebEngineView(qml)

$
0
0

Hi,
How can I set cookie before loading a url on WebEngineView that is created in qml code, can I inherit from something like WebEngineViewItem to create my customized WebEngineView?
the WebEngineView widget has a page() method that return page and then I can get profile and then the cookieStore but I didn't find any way for qml code.


Unsolved QT mf.dll error presumably OpenGl error

$
0
0

I get the following runtime errors when I run an QWebengineView program.I am on Windows 10 64bit.
I read abit aout the issue(though i am not sure if is the same exact problem) here BUG REPORT.But it says merged code review1 and code review 2.I presume this means , it has been integrated into QT 5.9 framework.

[9964:3004:0702/204303.476:INFO:dxva_video_decode_accelerator_win.cc(1120)] mf.dll is required for hardware video decoding
[9964:3004:0702/204303.476:INFO:dxva_video_decode_accelerator_win.cc(1120)] mf.dll is required for hardware video decoding
[9964:3004:0702/204303.774:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
[9964:3004:0702/204303.774:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
[9964:3004:0702/204303.775:ERROR:gpu_command_buffer_stub.cc(623)] Failed to create context.
[9964:3004:0702/204303.787:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
[9964:3004:0702/204303.789:ERROR:gpu_command_buffer_stub.cc(623)] Failed to create context.
[9964:3004:0702/204303.775:ERROR:gpu_command_buffer_stub.cc(623)] Failed to create context.
[9964:3004:0702/204303.787:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
[9964:3004:0702/204303.789:ERROR:gpu_command_buffer_stub.cc(623)] Failed to create context.
[9964:3004:0702/204303.909:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
[9964:3004:0702/204303.909:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
[9964:3004:0702/204303.911:ERROR:gpu_command_buffer_stub.cc(623)] Failed to create context.
[9964:3004:0702/204303.921:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
[9964:3004:0702/204303.922:ERROR:gpu_command_buffer_stub.cc(623)] Failed to create context.
[9964:3004:0702/204303.911:ERROR:gpu_command_buffer_stub.cc(623)] Failed to create context.
[9964:3004:0702/204303.921:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
[9964:3004:0702/204303.922:ERROR:gpu_command_buffer_stub.cc(623)] Failed to create context.
qt.network.ssl: QSslSocket: cannot resolve SSL_set_alpn_protos
qt.network.ssl: QSslSocket: cannot resolve SSL_CTX_set_alpn_select_cb
qt.network.ssl: QSslSocket: cannot resolve SSL_get0_alpn_selected

The mf.dll error specifically is what has me worried.
alt text

Unsolved HTML5 local storage (WebEngineView)

Unsolved QWebEngine causes problems in custom OpenGL renderer

$
0
0

Did you try to put QCoreApplication::setAttribute(Qt::AA_UseOpenGLES); before initializing the webengine?

Unsolved QWebEngineView Mouseover crashing on debug

$
0
0

I basically just initialize the class and add it to a vertical QSplitter. When I move the mouse over it is when I get the error:

this->webView = new QWebEngineView();
QSplitter *searchSplitter = new QSplitter(Qt::Vertical, this->widgetSearchResult);
searchSplitter->addWidget(this->webView);

Error I get is Screen shot

https://drive.google.com/file/d/0BwXCsqWT3wkXTWFwSmMtcm1Eb2s/view

When I look at the source code of web_event_factory.cpp I see that the error is landing on the Q_ASSERT(false);

static WebInputEvent::Type webEventTypeForEvent(const QEvent* event)
{
switch (event->type()) {
case QEvent::MouseButtonPress:
return WebInputEvent::MouseDown;
case QEvent::MouseButtonRelease:
return WebInputEvent::MouseUp;
case QEvent::Enter:
return WebInputEvent::MouseEnter;
case QEvent::Leave:
return WebInputEvent::MouseLeave;
case QEvent::MouseMove:
return WebInputEvent::MouseMove;
case QEvent::Wheel:
return WebInputEvent::MouseWheel;
case QEvent::KeyPress:
return WebInputEvent::RawKeyDown;
case QEvent::KeyRelease:
return WebInputEvent::KeyUp;
case QEvent::HoverMove:
return WebInputEvent::MouseMove;
case QEvent::TouchBegin:
return WebInputEvent::TouchStart;
case QEvent::TouchUpdate:
return WebInputEvent::TouchMove;
case QEvent::TouchEnd:
return WebInputEvent::TouchEnd;
case QEvent::TouchCancel:
return WebInputEvent::TouchCancel;
default:
Q_ASSERT(false);
return WebInputEvent::MouseMove;
}
}
Is there a way to disable Q_ASSERT(false) in debug mode?

Unsolved Reduce PDF size

$
0
0

Hi @HappyAct

I would try to scale the QPainter (using a world transform) by the factor between the size of the widget and the size of the page.rect.

-Michael.

Unsolved WebGL not working

$
0
0

Hi,

I am trying to use WebGL on a page in a QWebEngineView.

When navigating in that widget to http://webglreport.com/ I am presented with the message "This browser supports WebGL 2, but it is disabled or unavailable.".

When I try Three.js, I get these errors:
Uncaught TypeError: Cannot read property 'getShaderPrecisionFormat' of null
THREE.WebGLRenderer: Error creating WebGL context.

Other than this error, the web engine works well, e.g. I can visit YouTube and watch videos, etc. I tried to explicitly enable WebGL in the web engine settings, but that didn't change anything (and the docs say, that it's enabled by default anyway).

What do I miss? It's not easy to debug this.

Thanks a lot,
Stephan

Unsolved QWebEngineView - Frameless window drag region

$
0
0

Hello guys,

I have already written a post at stackoverflow, I'm trying to write a html ui with QT, using a framelewss window causes some troubles with dragging the window.

I started with CEF and I was able to catch some events to register drag RECT for the window.
How can I do the sam with QT?

I would like to set CSS to a div '-webkit-app-region: drag;' and after that the region is used to move
the window like mousePressEvent / mouseMoveEvent with a qwidget.

Do you have any solutions for my problem?

Kind regards
Sphinx


Unsolved QWebEngineView freezes while autoscrolling a web page

$
0
0

I'm using C++ with Qt v5.9.1.
I'm dealing with a problem when I use QWebEngineView. It freezes in the AutoScrolling, then it unfreezes and returns to normal after the AutoScrolling finish.

Freezes:

void MainWindow::on_BTN_Load_clicked()
{
    QUrl url = QUrl(ui->lineEdit->text());
    webview->page()->load(url);
    connect(webview->page(), &QWebEnginePage::loadFinished, this, &MainWindow::on_PageLoadFinished);
}

void MainWindow::on_PageLoadFinished()
{
    disconnect(webview->page(), &QWebEnginePage::loadFinished, this, &MainWindow::on_PageLoadFinished);

    //Get the page's height
    webview->page()->runJavaScript("document.body.scrollHeight",[&](const QVariant &result) {set_PageHeight(result.toInt());});
}

void MainWindow::set_PageHeight(int TheHeight)
{
    ThePageHeight = TheHeight;
    ScrollDownPage();
}

void MainWindow::ScrollDownPage()
{
    TheCurrentVerticalScroll = 0;

    while (TheCurrentVerticalScroll <= ThePageHeight)
    {
        webview->page()->runJavaScript(QString("window.scrollTo(0, %1);").arg(TheCurrentVerticalScroll));
        TheCurrentVerticalScroll += 100;

        QEventLoop loop;
        QTimer t;
        t.connect(&t, &QTimer::timeout, &loop, &QEventLoop::quit);
        t.start(30);
        loop.exec();
        qApp->processEvents();
    }
}

Works:
But, this problem doesn't appear when I click manually on a button that call the same AutoScrolling function.

void MainWindow::on_BTN_Load_clicked()
   {
       QUrl url = QUrl(ui->lineEdit->text());
       webview->page()->load(url);
       connect(webview->page(), &QWebEnginePage::loadFinished, this, &MainWindow::on_PageLoadFinished);
   }

   void MainWindow::on_PageLoadFinished()
   {
       disconnect(webview->page(), &QWebEnginePage::loadFinished, this, &MainWindow::on_PageLoadFinished);

       //Get the page's height
       webview->page()->runJavaScript("document.body.scrollHeight",[&](const QVariant &result) {set_PageHeight(result.toInt());});
   }

   void MainWindow::set_PageHeight(int TheHeight)
   {
       ThePageHeight = TheHeight;
       // ScrollDownPage();     //I disable this now
   }

   void MainWindow::ScrollDownPage()
   {
       TheCurrentVerticalScroll = 0;

       while (TheCurrentVerticalScroll <= ThePageHeight)
       {
           webview->page()->runJavaScript(QString("window.scrollTo(0, %1);").arg(TheCurrentVerticalScroll));
           TheCurrentVerticalScroll += 100;

           QEventLoop loop;
           QTimer t;
           t.connect(&t, &QTimer::timeout, &loop, &QEventLoop::quit);
           t.start(30);
           loop.exec();
           qApp->processEvents();
       }
   }

  //I add this:
   void MainWindow::on_BTN_Scroll_clicked()
   {
       ScrollDownPage();
   }

What I want:

I want to scroll the web page automatically, not manually by clicking the button.
Thanks.

Unsolved Capture client request HEADERS with QWebEngineView

Unsolved WebEngineView.IgnoreRequest doesn't work

$
0
0

Hi all,

I have trying to implement a WebView that not allow load a new page clicking a link. This is my code:

@    WebEngineView {
        id: webPage
        anchors.fill: parent
        onLoadProgressChanged: {
            console.log("cargado el "+loadProgress+ "% de "+url )
        }

        onNavigationRequested: {
            if (condition)
            {
                console.log("Allow")
            }
            else
            {
                request.action = WebEngineView.IgnoreRequest
                console.log("Ignore")
            }
        }
    }  @

When I press over some link in the WebEngineView, string "Ignore" is printed but the WebEngineView allows access to the new web page. It is working on Qt 5.9??

Is there another way to avoid the new web page will be loaded??

Is possible do it with WebWieb instead WebEngineView?

Thanks in Advance

Unsolved QWebengine : Can't load any url

Unsolved QT5.9 Windows7 64bit QWebEngine WebGL --Could not share GL contexts.

$
0
0

Did you manage to solve this? I'm using a WebView from QML, but get the same error when trying to render WebGL on Windows.

Viewing all 13965 articles
Browse latest View live