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

[[qanda:topic_unsolved]] where does QWebEnginePage::linkHovered get its url

$
0
0

Hi,

I have some urls with relative paths that begin with "../" but the url's path that I received from QWebEnginePage::linkHovered begins with the current directory instead of the parent directory.

It's not only the QWebEnginePage::linkHovered that doesn't work for me, if I try to open these urls the QtWebEngine try to use the wrong path.

I'd like to know where is the settings to make the QtWebEngine interpret relative path correctly ?

I don't know if it's related to the fact that I use a custom scheme.


[[qanda:topic_unsolved]] Missing qtwebengine5-dev Ubuntu16 with cmake

[[qanda:topic_unsolved]] QWebEngineView img label display QPixmap

$
0
0

Hi, all
c++:
signals:
void signalImage(QPixmap img);

js:
bound.signalImage.connect(function(img){
//<img id='imgid'></img>
var imgid = document.getElementById("imgid");
//img is QPixmap
imgid .src=??
});

[[qanda:topic_unsolved]] QWebEngineView img label display QPixmap

$
0
0

Hi, all
c++:
signals:
void signalImage(QPixmap img);

js:
bound.signalImage.connect(function(img){
//<img id='imgid'></img>
var imgid = document.getElementById("imgid");
//img is QPixmap
imgid .src=??
});

QWebkit assignToHTMLImageElement no problem
but it's not going to work QWebEngineView assignToHTMLImageElement
error:js: Uncaught TypeError: Cannot read property 'assignToHTMLImageElement' of null
i didn't get it right anywhere?

[[qanda:topic_unsolved]] How to disable scrolling past the top/bottom/left/right in a QWebEngineView rendered page ?

$
0
0
Hi There: Do you find out the solution? I'm facing the same problem with Qt 5.13.1. Cheers

[[qanda:topic_unsolved]] How to delete cache after using QWebEngineView

$
0
0
@Oeffner Hmm. I had recent problem of code creating & getting rid of QWebEngineViews repeatedly consuming more & more memory/leaving 26 QtWebEngineProc processes running. I didn't look at temp files, but might be related. If your web engines don't properly disappear they are liable to hang onto their temp files. I am Ubuntu, but apparently my fix did work on Windows too. I use PyQt5 not PySide2. I had to use a PyQt call of sip(QObject obj).delete() to force it to be freed. I was told that compares to C++ delete. I don't know how your code actually compares to that. For example, if there's any reference to an instance around your code will accomplish nothing? You want to look carefully at your instances creation/destruction.. I found there was something about QWebEngineView which seemed to make it "stick around" more than other widgets, but never got to the bottom of that. One thing: does your code go back to the main Qt event loop after you have done whatever to delete your webengine? The issue was toed up with allowing tha\t to run to truly clear up.

[[qanda:topic_unsolved]] How to clear and redraw path on map using MapPoltline

$
0
0

I have MapPolyline on my map and want to clear that polyline and redraw new polyline when user click on mouseclick area. I am using clearMapItem() to clear MapPolyline. The problem is I'm unable to redraw MapPolyline once it clear. Also I used removeCoordinate() function to remove cooedinate one by one from path but gets same problem.
main.qml

  import QtQuick 2.9
  import QtLocation 5.6
  import QtPositioning 5.5
  import QtQuick.Controls 2.5


ApplicationWindow {
visible: true
width: 1000
height: 1000

title: qsTr("GroundControl System")
property alias mapAreaClick: mapAreaClick



Item {
    visible: true
    width: 1756
    height: 900

    Plugin{
         id: hereMaps
         name: "here"
         PluginParameter { name: "here.app_id"; value: "oBB4FivcP23m2UZQCj8K" }
         PluginParameter { name: "here.token"; value: "P-D8XRRGeVt0YphUuOImeA" }
     }

    Map {
        id: mapOfWorld
        anchors.verticalCenterOffset: 10
        anchors.horizontalCenterOffset: 21
        anchors.rightMargin: -21
        anchors.bottomMargin: -10
        anchors.leftMargin: 0
        anchors.topMargin: 10
        anchors.centerIn: parent;
        anchors.fill: parent
        zoomLevel: 10
         plugin: hereMaps
     center: QtPositioning.coordinate(19.997454, 73.789803)//KORD

       MapPolyline {
            id:polylineId
             antialiasing: true
                        line.width: 5
                        line.color: 'green'
                        path: []

        }
        /*----------------------- Mouse Click Area-----------------------*/
        MouseArea {
            id: mapAreaClick
            anchors.rightMargin: 669
            anchors.bottomMargin: -18
            anchors.leftMargin: -8
            anchors.topMargin: 21
            anchors.fill: parent
                onClicked:  {
                  var cordinate = mapOfWorld.toCoordinate(Qt.point(mouse.x,mouse.y))
                  var poly= polylineId.addCoordinate(cordinate);

                }
                Button {
                    id: button2
                    x: 45
                    y: 29
                    text: qsTr("Clear")
                    onClicked: {
                      //  Lists.clearData();
                        mapOfWorld.clearMapItems(polylineId);
       // for (var index = 0; index <= polylineId.pathLength(); index++)  
      //{                                 
       // polylineId.removeCoordinate(polylineId.pathLength[index]);
         //              }

                      }
                }

                Button {
                    id: button3
                    x: 45
                    y: 94
                    text: qsTr("Button")
                    onClicked: {

                    }
                }
        }
       }
      }
       }

[[qanda:topic_unsolved]] Qt Webkit troubleshoots

$
0
0

hello,
I'm using Qt Creator 4.10.1 in Windows 7 ( Qt version 5.13.1 (MSVC 2017, 32 bit) ).
I'm triying to make a navigator app for Windows.
When I try to use the " webenginewidgets " in my *.pro file and execute the qmake I have this error " Unknown module in QT : webenginewidgets ".
I verrified if the " Webkit" is installed in the QT directory, it is.
some proposed to use the MSVC 2013 at least. I have MSVC 2015 and 2017 installed and do have a VS 2017 installed in my laptop ( but I see an exclamation point beside it in the Tools/Options/kits/QT versions and a message that this compiler can't produce any code for this QT version" , only MSVC 2015 32bits and MINGW work correctlly).

my *.pro file:

FORMS += \
    mainwindow.ui

HEADERS += \
    mainwindow.h

SOURCES += \
    main.cpp \
    mainwindow.cpp

QT += widgets webenginewidgets

CONFIG += c++11 

the error I'm getting " Unknown module(s) in QT: webenginewidgets "

here are some images to help you to understand:

MainWindows.cpp

4.JPG

1.JPG

3.JPG

1.JPG

Can any one propose a solution or guide me to find one?

Best regards.


[[qanda:topic_unsolved]] Does QWebEnginePage::load() start a new event loop internally or it just calls processEvents ?

$
0
0

After debugging an application crash, I have found that QWebEnginePage::load() internally processes queued events and causes unexpected re-entrancy in my code.
I have modified my code to handle reentrancy, but there are parts of my code that invoke deleteLater(). To be sure that some objects will not get deleted while within QWebEngine::load(), I would like to know if that method starts internally an event loop or it just calls processEvents().

Thanks in advance.

[[qanda:topic_unsolved]] Boot2Qt Splash Screen

$
0
0

Hello, I'm using Boot2Qt 5.12.4. on a Toradex Apalis iMX.6. Is there a way to set up a splash screen that displays during the kernel boot? Currently my uboot splash screen displays for a fraction of a second and then I get about 10 seconds of a black screen before the kernel finishes starting up and my application loads.

[[qanda:topic_unsolved]] How to set timezone for web engine's javascript engine?

$
0
0

Current behavior

This would show the local system's local time and timezone.

Question

How can I tell QWebEngineView to use a different timezone when executing javascript in the browser, instead of using the system timezone?

[[qanda:topic_unsolved]] Include cutelyst to Qt Creator - Windows

$
0
0

Hello,
i would like to work with the web framework cutelyst in my Qt Creator on Windows.

Could you support me adding the frameqork to my qt IDE?

I am actually clueless, how to include the source files to my system on windows.

[[qanda:topic_unsolved]] How do I update header file with .ui update?

$
0
0

How do I update the header file after saving the .ui file?

I've disabled shadow copying, and can see that it generated a ui_projectname.h file but it does not change the main header file.

What I am trying to do is import a .ui from a PyQt5 project that I've made, and want to convert to C++. I am unable to access any members such as lineEdit->setText("Hello World"); in the main.cpp after Widget w;

Any help with this would be unfathomably wonderful.

[[qanda:topic_unsolved]] Example "simplebrowser.py" errors

$
0
0

System: Windows 10 pro build 1809
Python: V 3.7.5
Pyside2: V 5.13.2

When trying "simplebrowser.py" from the examples it runs, but with following errors in a PyCharm - console:

WSALookupServiceBegin failed with: 0
and several:
NOT IMPLEMENTEDUnsupported permission type: 13

Anyone any idea what it is and how can I get rid of the errors?

[[qanda:topic_unsolved]] Access WebEngineView from C++

$
0
0
Hi, I found the answer here: https://stackoverflow.com/questions/21133817/access-qml-webview-from-c In short: In the .pro file: QT += quick quick-private webengine webengine-private webenginecore webenginecore-private In the qml file: WebEngineView { id: webEngineView objectName: "webEngineView" In the c++ file: QQuickWebEngineView webEngineView = view.rootObject()->findChild<QQuickWebEngineView>("webEngineView");

[[qanda:topic_unsolved]] QtWebEngine 5.11.3:Requested OpenGL implementation is not supported: Implementation: 0

$
0
0
This problem is caused by old version of EGL. It has been resolved with Mesa-based EGL 1.5.

[[qanda:topic_unsolved]] QWebEngineHttpRequest - Post request

$
0
0

Hi there,

I tried to create a post request with QWebEngineHttpRequest to load it in QWebEngineView but this is not working as expected unfortunately.

Here is the goal. I have currently an simple http get request, and I would like to transform it in a post request, the server allow both request then this should be not a problem of the server but from my request.

Here is an example. First I build my request to be a get (this works but is unsecured).

// Create the base URL
this->apiUrl.setScheme("https");
this->apiUrl.setHost("www.domainname.com");
this->apiUrl.setPath("/path/of/the/api/end/point/");

// Create the query
qurlqr.addQueryItem("Class", "Patient");
qurlqr.addQueryItem("Method", "CreateOrder");
qurlqr.addQueryItem("LoginName", login);
qurlqr.addQueryItem("Password", password);
...
qurlqr.addQueryItem("patCountry", "CH");
qurlqr.addQueryItem("treatmentCode", "");

this->apiUrl.setQuery(qurlqr);

// Create an engine view widget
QWebEngineView *webView = new QWebEngineView(this);
 webView->load(this->apiUrl);

This code works and do a GET request. Now I would like to transform this query in a post request inside my QwebEngineView, to do that I wanna create a QWebEngineHttpRequest .

Then here is the code to transform this :

// Create the base URL
this->apiUrl.setScheme("https");
this->apiUrl.setHost("www.domainname.com");
this->apiUrl.setPath("/path/of/the/api/end/point/");

QWebEngineHttpRequest request = QWebEngineHttpRequest();
request.setUrl(this->apiUrl);
request.setMethod(QWebEngineHttpRequest::Post);
request.setHeader(QByteArray("Content-Type"), QByteArray("application/x-wwwform-urlencoded"));

// Create the query
qurlqr.addQueryItem("Class", "Patient");
qurlqr.addQueryItem("Method", "CreateOrder");
qurlqr.addQueryItem("LoginName", login);
qurlqr.addQueryItem("Password", password);
...
qurlqr.addQueryItem("patCountry", "CH");
qurlqr.addQueryItem("treatmentCode", "");

// Convert Query URL to QByteArray and set post data to request
QByteArray postData = qurlqr.toString(QUrl::FullyEncoded).toUtf8();
request.setPostData(postData);

QWebEngineView *webView = new QWebEngineView(this);
webView->load(request);

But unfortunately this is not working, I think my problem is comming from postData but not sure. Do you have any advice to help me ? Any help will be appreciate.

[[qanda:topic_unsolved]] Find Out Now, What Should You Do For Fast Buy Columbia University Degree?

$
0
0

https://www.buydegreeonline.net/
Fake university transcripts in the UK. Welcome to the only place where you can purchase a fake UK university degree without going to college. buy a fake degree online. You know very well that there is no document that you are already in school and you will not be promoted to the career ladder. fake degrees with verification.
Most of the problems that plague people include where they can find another job if they lose their jobs. In fact, buy a genuine degree certificate in Paris. research shows that one-third of the 1,500 employees have been worried about unemployment. It is this concern that has prompted us to obtain an accredited degree by paying a small fee, [buy a fake Ph.D. certificate.](link URL https://www.buydegreeonline.net/) thus offering a viable solution.
We keep in touch with a number of reliable UK universities with real campuses. However, buy fake Florida State University diploma. for confidential reasons, we are unable to disclose our name here, just as you will not disclose your name to anyone when you purchase a degree certificate from us.
Website:https://www.buydegreeonline.net/

Email: buydegreeonline2018@gmail.com

Whatsapp: +852 65578477

Wechat: +852 65578477

QQ: 2125584624

Skype: ka.ruby1

[[qanda:topic_unsolved]] How to import js and css into html file

$
0
0

Hello all,

I'm loading an html code using QTWebEngine, but it does not load the external files in the html code.

This is my index.qml file:

import QtQuick 2.12
import QtQuick.Controls 2.12
import QtWebEngine 1.0

ApplicationWindow {
id: window
visible: true
width:640
height:480
WebEngineView {
id: webEngineView
anchors.fill: parent
}
Component.onCompleted: {
var html="<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'
'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>

<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
  <base href='/'>
  <title>Markup Converter Assistant</title>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <meta http-equiv='X-UA-Compatible' content='IE=edge'>
  <meta property='og:image' content='conversation.svg' />
  <meta property='og:title' content='Conversation Chat Simple' />
  <meta property='og:description' content='Sample application that shows how to use the Watson Assistant API to identify user intents' />
  <link rel='shortcut icon' href='favicon.png' type='image/png'>
  <link rel='stylesheet' href='css/app.css'>
</head>

<body>
  <!-- <div id='view-change-button' class='button' onclick='PayloadPanel.togglePanel(event, this)'>
    <img class='option full' src='../img/Chat Button.png'>
    <img class='option not-full' src='../img/Code Button.png'>
  </div> -->
  <div id='contentParent' class='responsive-columns-wrapper'>
    <div id='chat-column-holder' class='responsive-column content-column'>
      <div class='chat-column'>
        <div id='scrollingChat'></div>
        <p class='user-typing' id='user-typing-field'></p>
        <label for='textInput' class='inputOutline'>
          <input id='textInput' class='input responsive-column' placeholder='Type something' type='text' onkeydown='ConversationPanel.inputKeyDown(event, this)'
            autofocus>
        </label>
       
      </div>
    </div>
    <div id='payload-column' class='fixed-column content-column'>
      <div id='payload-initial-message'>
        Type something to see the output
      </div>
      <div id='payload-request' class='payload'></div>
      <div id='payload-response' class='payload'></div>
    </div>
  </div>

  <script src='js/common.js'></script>
  <script src='js/api.js'></script>
  <script src='js/conversation.js'></script>
  <script src='js/uiActionFunctions.js'></script>
  <script src='js/payload.js'></script>
  <script src='js/global.js'></script>
  <script type='text/javascript' src='https://cdn.rawgit.com/watson-developer-cloud/watson-developer-cloud.github.io/master/analytics.js'></script>
</body>
</html>
"
webEngineView.loadHtml(html)
}
}

The html is rendering in a pop up window as I want but the scripts and stylesheet is not imported. Please what's the right way to rewrite this qml scripts so I can import and load the scripts and stylesheets?

[[qanda:topic_unsolved]] inizialize

$
0
0

I have this error in my app.

QtWebEngine::initialize() must be called after the construction of the application object.

But I have put intialize after .. Whay this ?

9a9953a4-2b67-4324-a947-b9bef6774a45-image.png

Viewing all 13965 articles
Browse latest View live