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

Solved QtWebEngine build silently ignored on Windows

$
0
0

Thank you, compiling QtWebEngine by hand did output error messages, one being that WindowsSDKVersion environment variable was not set and the other being that "Python 2.7.5 or later" means "Python lower than 3".

While there are still errors along the build, the original problem has been solved. QtWebEngine is starting compilation now.


Unsolved Access denied while building QtWebEngine (ninja -> python)

$
0
0
[2/15150] ACTION //third_party/WebKit/Source/core:make_core_generated_css_property_names(//build/toolchain/win:x64)
FAILED: gen/blink/core/CSSPropertyNames.cpp gen/blink/core/CSSPropertyNames.h
E:/Programs/python27/python.exe ../../../../../qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/build/scripts/make_css_property_names.py ../../../../../qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/core/css/CSSProperties.in --output_dir gen/blink/core --gperf gperf.exe
Traceback (most recent call last):
  File "../../../../../qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 238, in <module>
    in_generator.Maker(CSSPropertyNamesWriter).main(sys.argv)
  File "E:\dev\git\qt5\qtwebengine\src\3rdparty\chromium\third_party\WebKit\Source\build\scripts\in_generator.py", line 108, in main
    writer.write_files(options.output_dir)
  File "E:\dev\git\qt5\qtwebengine\src\3rdparty\chromium\third_party\WebKit\Source\build\scripts\in_generator.py", line 60, in write_files
    self._write_file_if_changed(output_dir, generator(), file_name)
  File "../../../../../qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/build/scripts/make_css_property_names.py", line 233, in generate_implementation
    gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True)
  File "E:\Programs\python27\lib\subprocess.py", line 390, in __init__
    errread, errwrite)
  File "E:\Programs\python27\lib\subprocess.py", line 640, in _execute_child
    startupinfo)
WindowsError: [Error 5] Access denied

This is a really weird error as I'm not able to reproduce it myself. It only happens when I run the entire build with jom/nmake.

Copying the related stuff out of make_css_property_names.py:233 and executing the test file test.py:

import subprocess

gperf_args = ['gperf.exe', '--key-positions=*', '-P', '-n']
gperf_args.extend(['-m', '50'])  # Pick best of 50 attempts.
gperf_args.append('-D')  # Allow duplicate hashes -> More compact code.
gperf = subprocess.Popen(gperf_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, universal_newlines=True)
gperf.communicate("test")[0]

print("no error")

with python test.py in the exact same Visual Studio Command Prompt that I just ran jom in to produce above error, it outputs "no error".

And yes, I'm running the Visual Studio Command Prompt as administrator.

Environment:

  • Visual Studio 2017 Community x64 Command Prompt
  • Python 2.7.13
  • jom 1.1.2
  • Qt sources from git branch 5.9

Anybody having a guess of what might be going on here ?

Solved QWebEngineView not working with QVirtualKeyboard

$
0
0

Hey everyone,

Im trying to use the Virtual Keyboard on a website, rendered within a QWebEngineView, but the keyboard does not pop up if I click into a text field. If I place a QLineEdit, next to the QWebEngineView and click into it, the Virtual Keyboard works as expected. Interestingly, if I clicked into the QLineEdit once, it starts also popping up, when clicking into the text field on the web page, but it still does not receive any key strokes. Somehow I can not belief, that the Virtual Keyboard is not working within QWebEngineView, since this seems a rather common use case to me.

Did I miss something? Does someone else see this problem?

To reproduce, any example using QWebEngineView can be used. The only modification necessary is to paste the following line, before QApplication(...) is created:

qputenv("QT_IM_MODULE", QByteArray("qtvirtualkeyboard"));

I'm working on Fedora 25 with Wayland.

Thanks,
Pascal

--

Update1:
Some further debugging in QVirtualKeyboardunveiled, that PlatformInputContext::setFocusObject() is not being called for Widgets rendered within QWebContentView, but why?

Update2:
I don't really know why, but since I compiled QWebEngine myself, it works!

Unsolved QWebEngine causes problems in custom OpenGL renderer

$
0
0

Our team is upgrading from qt 5.3 to 5.7, can't do 5.8 just yet.
We do simulations and occasionally we display web content and were using QtWebKit to do so. While using QtWebKit we were not having any problems between Qt and our in house renderer.

When we swapped in QWebEngine is when opengl started to throw errors in our rendering code.

We initialize QWebEngine at the start of the application and everything is fine, but when we try to load a web page we get an opengl error.

When we load a web page is random, its done through user interaction, it could be seconds after everything is loaded or minutes.

If our renderer is disabled just before loading a web page and then re-enabled after its loaded, no error's are thrown.
If we don't disable our renderer and close the web page, errors are thrown.
And if it is disable, close the page and then re-enable errors are thrown.

Normally our renderer is threaded, the rendering operations are done on a seperate thread, but for these tests our renderer is moved to the main thread. There is no difference in behavior it is threaded or not.

The error's we see are,
In glClientWaitSync we get GL_INVALID_ENUM when trying to delete the sync object
And in glDrawArrays, no error is given it just halts, if debugging. If not debugging, the app just closes down.

I have tried using opengl's debug message callback (GL_ARB_debug_output) which is how we see GL_INVALID_ENUM for glClientWaitSync, but the callback is not called when glDrawArrays errors out.

Steps have been taken to ensure the Opengl version and profile type are then same, 3.2 compatibility, between our renderer and Qt's Globally shared opengl context. This may be different from QWebEngines. The documentation stats that QWebEngine uses opengl 2.x, but I can't confirm this.

The pixel format may be different, I'm not sure how to get QWebEngines to test if they are the same.

Unsolved qt-webengine-javascript-failed-to-load-png-image

$
0
0

My work Environment : Qt 5.8 MSVC2015 64bit, Windows 7 64 bit, Web engine, JavaScript.

In in QT code i am loading image, converting data into QByteArray & transfering back to JavaScript. So javaScript can render image.

But Why JavaScript failed to load .png images, any clue what I am missing here ?

QT .h file code :

Q_INVOKABLE QByteArray GetTile();

QT .cpp file code :

QByteArray ExportedObject::GetTile()
{
QByteArray arr;
QFile imageFile("D:\\2.png");
arr = imageFile.readAll();
imageFile.close();
return arr;
}

JavaScript code :

window.interface.GetTile(function(returnValue) {
        document.getElementById("ItemPreview").src = "data:image/png;base64," + returnValue;
        return returnValue;
});

Solved Qt 5.8 - MSVC 2015 (x64) - Build error

$
0
0

Hi, for problems concerning path too long issues, I suggest you to try the new long path tool. This can help you with all kinds of path too long cases.

Unsolved QWebEngineView with proxy on linux

$
0
0

Hi,

I am using QWebEngineView in my application. On launching the application, the application connects to the server and loads the view using QWebEngineView.

In normal scenario, application is working fine on both windows and Linux.
I want to use proxy server to connect to the server. To force my application and to ensure that it is using proxy server, i am blocking my machine's IP through firewall.

Now what happens in case of proxy server is that on windows, it picks the proxy setting of IE and connects to the server.
On Linux, i am doing the proxy setting using GNOME. However, on Linux, it is not picking the proxy setting from GNOME and thus, not able to connect to the server.

So, please tell me what is the correct way of using system proxy settings on Linux in QWebEngineView?

On QT documentation, it is mentioned that on Linux, proxy settings are automatically picked from GNOME/KDE but it is not happening in my case.

What am i doing wrong and how can i do it?

Thanks in advance.

Unsolved How to disable UI shortcuts when QWebEngineView widget is active

$
0
0

Hello,

I have a pyqt5 ui that uses a shortcut that refreshes the data. Whenever I'm in a text field this of course is disabled allowing me to type the character 'r' without doing the refresh.
However, I have a qwebengineview widget running a chat board that still catches this shortcut when I try to type in the text entry field.
Is there a way to disable shortcuts when a qwebengineview widget is the active widget?

Best,
-Mark


Unsolved Custom MIME Type in Drag And Drop from QtWebEngine to Another App

$
0
0

Good morning,

Could anyone please tell if custom MIME types are supported in drag and drop from HTML in QtWebEngine?
I see them working properly when I implement drag and drop within the web-page. But I cannot get any custom MIME type payload when I drop to an external app (e.g. to Chrome).
Drag and drop of custom MIME type from one instance of QtWebEngine to another also does not work.
Drag and drop of custom MIME type from Chrome to QtWebEngine does not work either.

Is this a setting in WebEngine maybe? Or implementation limits?

I know that Chrome registers "Chromium Web Custom MIME Data Format" clipboard format in Windows and Linux, and that's what it uses for custom MIME types.
https://github.com/scheib/chromium/blob/d2338b606d6536d20975a601c197d3e2ee3cec0e/ui/base/clipboard/clipboard_win.cc#L394

Drag and drop of custom MIME types between two Chrome instances works, but drag and drop of the same payload between two instances of web pages loaded in different QtWebEngine processes does not work :/

If you have any idea how that could be fixed, it would be helpful.

Thanks,
Sergey

Unsolved QT webengine installation issues

$
0
0

Hi there,

I want to use QT 5.9 and webengine with webview (as I understood, webview now is in webengine). So what I did is installed 5.9 with this setup:

alt text

After the installation finished, I couldn't locate the webkit .pri:
alt text

This is what I get when trying to build:
alt text

:-1: error: Unknown module(s) in QT: webengine

Couldn't find any normal Windows installation manual, so have to ask.

Thank you

Unsolved pass a file object to QWebEngineView

$
0
0

hello,
how to send an opened file inside the main application to a page in QWebEngineView and handle it by javascript FileReader() function , as it was opened by an html5 file input inside the QWebEngineView,
thanks.

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

$
0
0

Hi.
I would like to ask a question.
When I used QT5.7 or QT5.8 QWebEngine, I think there is no problem. in watching webGL Page.
But When I use QT5.9 QWebEngine,Most of All Page is not working..I got a Error Message

[7816:2000:0602/095657.738:ERROR:gl_context_wgl.cc(78)] Could not share GL contexts.
js: Error creating WebGL context.

I checked it on QWebEngine sample project WebEngine Demo Browser and WebEngine simple browser and so on.

for example,
[page viewing successed]
https://www.cubeslam.com/dsbkbx
[page viewing failed]
http://alteredqualia.com/three/examples/webgl_terrain_dynamic.html
http://potree.org/demo/potree_1.3/showcase/lion_head_simone_garagnani.html
etc..

I think Error Page might be using three.js?

when I access their failed Web page from Chrome Web Browser,there is no problem.but when I access their pages on from QT5.9 using webEngine application ,it is not.

my environment is Windows7 or 10 ,64bit intel HD Graphics
I try other PC,
Windows10[64bit),GTX980Ti(newdriver applied)

If there is any reason , Could you tell me solution?
thanks

Unsolved QTWenEngine & Chromium browser on same Application Causing clashes.

$
0
0

I am Using QTWebEngine along with CEF Framework libraries in a common Application on MAC. Ite giving me error stating some classes implemented in both Chromium Embedded Framework & libQt5WebEngineCoreVEN.dylib. One of the two will be used. Which one is undefined. This issue is only on MAC, in windows its working.

Unsolved How to configure qt web view in qt static command qtwebview is not installed

$
0
0

Hello
I configure qt as static build in windows but in run time give me this error ("qtwebview is not installed")
Is there any way to build qtwebview in static version?
my current command

configure -static -debug-and-release -prefix "C:\Qt\Static\5.8.0" -platform win32-msvc2015 -qt-zlib -opensource -confirm-license -qt-pcre -qt-libpng -qt-libjpeg -qt-freetype -sql-odbc -sql-sqlite -skip qt3d -skip qttools -opengl dynamic -make libs -nomake tools -skip qtdoc -skip qtwayland -no-qml-debug -skip qtscript -no-icu -no-compile-examples -nomake examples -nomake tests

Unsolved Use QWebEngineView as a widget in QDockWidget comes an odd bug?

$
0
0

Use QWebEngineView as a widget in QDockWidget, when undocked, works normal, once docked comes all mainwindow UI in displacement mode, see image below:
0_1496739071652_upload-d7c7dc1b-8ac8-4bff-ab58-0f90fe3a0d20 ![alt text](image url)
eg, if you want close the dockwindow, you cannot push X , you need click some position up to it(red dot in the image).

the same code works well in some workmates env. while others not as just described. we use qt5.8 on windows.


Unsolved QTBUG-44763 still not fixed yet?

$
0
0

https://bugreports.qt.io/browse/QTBUG-44763

I reproduce this bug with QT 5.7.0, QT 5.7.1 and even QT 5.9.0 x86 for msvc2015 in my Windows 10 15063, which has 2 vmware virtual network adapters and LAN proxy auto-detect enabled.
as I disabled LAN proxy auto-detect the bug gone.

Unsolved How to do “curl -X PUT -d someASCII 192.168.1.1:80”

$
0
0

Hello All,

I am stuck programming something that does the same as “curl -X PUT -d someASCII 192.168.1.1:80”. This is the code, it open the connections but my data “someASCII” is not coming:

QUrl url("http://192.168.1.1:80");
QNetworkRequest request(url);
request.setHeader(QNetworkRequest::ContentTypeHeader,"application/x-www-form-urlencoded");
QNetworkAccessManager qnam;
qnam.put(request,”someASCII”);

This is what gets you the other side of the connection. The content length is right but I get no content:

client received: PUT / HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Content-Length: 9
Connection: Keep-Alive
Accept-Encoding: gzip, deflate
Accept-Language: en-US,*
User-Agent: Mozilla/5.0
Host: 192.168.1.1:80

Any suggestions?

Thanks
Markus

Unsolved QWebEngine can't load localhost on Windows

$
0
0

Hello everyone!

I'm porting old WebKit framework to the new QWebEngine
I'm using Qt 5.6
I need to load local webapps through localhost to bypass flash player security using QtcpServer.

MainWindows start my tcp server with port 5052
in My webEngineClass (webenginewidget.cpp) there is a method that open the webapp

void WebEngineWidget::openDocument()
{
    QString webAppUrl = ResourceManager().getWebappsDir("videoswf/index.html").absolutePath();
    QString indexUrl = "http://localhost:5082" + webAppUrl;
    QUrl index(indexUrl);
    qInfo() << "openVideoDocument" << index;
    view->load(index);
}

So on loadFinished i can call runjavascript to create my embed video swf
This work very well on mac Osx
output of qInfo:

openVideoDocument QUrl("http://localhost:5082/Users/dev/build/webapps/videoswf/index.html")

But in Windows
qInfo() << "openVideoDocument" << index show

qInfo() << "openVideoDocument" << QUrl("");

Any Idea ??
Thanks in advanced
GG

Unsolved QML WebengineView does not return http page errors

$
0
0

Hi So I am new to QML but it seems straight forward to me.
I am tring to create a simple single windows browser window that displays our webpage and runs on a arm based linux system. I have gotten it to build both on our yocto build system and also on ubuntu linux with version 5.5.1 and 5.6.2 on ubuntu.
I need to beable to detect the error page so i can then load a custom HTML page

I just used the example code to start with and added a couple of keys to change page and see the reponses , code shown below. One action changes to an invalid page which returns the HTTP 404 error page and it reports nothing in the onLoading changed. no error code and domain.

So then I noticed the settings.errorPageEnabled which i then set to false hoping now it would give me an error code etc. yet it does not it always displays the error page and does not report any error codes. It just says the page loaded correctly when it clearly has an 404 http error , yes it loaded the error page correctly.

I have been digging around in the source code and the errorPageEnable setting seems to be some sort a test attribute but why it seems like a standard thing to want to know if the web page you just set actually loaded correctly

So how do I make to api function work? or is it broken

import QtQuick 2.0
import QtQuick.Window 2.1
import QtWebEngine 1.2
import QtQuick.Controls 1.0

Window {
id: mainWindow
    width: 800
    height: 600
    visible: true

    WebEngineView {
        id: mywebEngineView
        anchors.fill: parent
        settings.errorPageEnabled: false
        url: "http://localhost/gdm/index.htm"

        onLoadingChanged: {
            print("onloadingchanged called ")
            if (loadRequest.status === WebEngineLoadRequest.LoadFailedStatus)
            {
                print(loadRequest.errorCode)
                print(loadRequest.errorString)
                print("url " + loadRequest.url + " Domain " + loadRequest.errorDomain)
                if ( loadRequest.errorDomain == WebEngineView.HttpErrorDomain )
                {
                    print("http error")
                }

                print("load status failed")
            }
        }
    }

    Action {
        id: refreshTrademe
        shortcut: "Ctrl+L"
        onTriggered: {
            mywebEngineView.settings.errorPageEnabled = false;
            mywebEngineView.url= "http://www.trademe.co.nz"
        }
    }

    Action {
        id: errorPageTest
        shortcut: "Ctrl+M"
        onTriggered: {
            print("ctrl+M")
            mywebEngineView.url= "http://localhost/gdm/index.htm"
        }
    }
}

Unsolved Not Allowed load local resources QtWebEngine disable web security

$
0
0

Hi!

I'm in trouble with WebEngine web security (on windows) and Qt 5.6.2

Calling this method with runJavascript

function doCreateVideoPage(sourcePath,config,start,finish,videofile)
{
    document.getElementById("main-box").innerHTML = "";
	var flashvars = "subtitles="+config+"&videourl="+sourcePath+"&start="+start+"&finish="+finish;
    var html = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="10%%" height="100%" id="webenginemanager" align="middle">'
    html += '<param name="movie" value="'+videofile+'" />'
    html += '<param name="FlashVars" value='+flashvars+' />'
    html += '<param name="quality" value="high" />'
    html += '<param  name="bgcolor" value="#000" />'
    html += '<param name="play" value="true" />'
    html += '<param name="loop" value="true" />'
    html += '<param name="wmode" value="window" />'
    html += '<param name="menu" value="true" />'
    html += '<param name="devicefont" value="false" />'
    html += '<param name="salign" value="" />'
    html += '<param name="allowScriptAccess" value="always" />'
    html += '<embed play="false" swliveconnect="true" name="webenginemanager" src="'+videofile+'?'+flashvars+'" quality="high" bgcolor="#000" width="100%" height="100%" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"/>'
    html += '</object>'
    document.getElementById("main-box").innerHTML = html;
}

my VideoPlayer create correctly

but get this error in console

 Not allowed to load local resource: file:///C:/Program%20Files%20(x86)/myapp/videoswf/videoplayer.swf?subtitles=C:/Users/dev/AppData/Local/myapp/bWVsb25pQGR1ZGF0Lml0/9788808436566/0b22b9e0-085a-406c-a0d0-f4a85867800e/yefe2e/bbbag/h1ay629z/gxan-nh0j9&videourl=C:/Users/dev/AppData/Local/myapp/bWVsb25pQGR1ZGF0Lml0/9788808436566/0b22b9e0-085a-406c-a0d0-f4a85867800e/yefe2e/bbbag/h1a62/gxanbnh0-q&start=&finish=

So i've tried to run my QApplication with --disable-web-security

int main(int argc, char *argv[])
{
   // --ppapi-flash-path =/Users/mariomeloni/Develop/build/

    QCommandLineParser opts;
    argv[0] = "--disable-web-security"; // same error with argv[0]="disable-web-security"
    if(argc == 0)
        argc = 1;
    QApplication app(argc,argv);
    // more code
   app.exec();
}

I'm using Window with Qt 5.6.2

Any suggestion are welcome
Sorry for my bad english and thanks in advanced
I'm really desparate
GG

Viewing all 13965 articles
Browse latest View live