Skip to content

QtWebEngine

Discussions and questions on QtWebEngine
1.3k Topics 4.0k Posts
  • No content on macOS M

    Unsolved
    2
    0 Votes
    2 Posts
    317 Views
    No one has replied
  • QWebEngineView not showing on Linux Mint

    Solved
    2
    0 Votes
    2 Posts
    552 Views
    I
    Found the problem, I'm replying if someone else got the same problem. I needed to put this line of code : os.environ["QTWEBENGINE_CHROMIUM_FLAGS"] = "--no-sandbox" And to use sys.argv when initializing the app : App = Qt.QApplication(sys.argv) The final code being the following : import PyQt5.QtWidgets as Qt from PyQt5 import QtCore import PyQt5.QtWebEngineWidgets as QtWeb import sys import os class WebView(Qt.QMainWindow): def __init__(self): super().__init__() self.setWindowTitle("Web View") self.setGeometry(100, 100, 800, 600) self.webview = QtWeb.QWebEngineView(self) self.setCentralWidget(self.webview) self.webview.load(QtCore.QUrl("https://www.google.com")) if __name__ == "__main__": os.environ["QTWEBENGINE_CHROMIUM_FLAGS"] = "--no-sandbox" App = Qt.QApplication(sys.argv) window = WebView() window.show() app.exec_() Hope it helps if someone gets the same issue !
  • QWebEngineView - Application Not Responding

    Unsolved
    12
    0 Votes
    12 Posts
    1k Views
    Juan DevJ
    If I keep the code posted above and if I modify my webBrowser function with this code void MyMainWindow::webBrowser() { // Creation Objects m_webViewer = new QWebEngineView(); // Initialisation QString urlPage = "http://factice_url/simple_page.html"; // Setting and Loading URL (HTTP Object used because subsequently need to apply headers) QWebEngineHttpRequest httpObjet; httpObjet.setUrl(urlPage); m_webViewer->load(httpObjet); // Connexions connect(m_webViewer,&QWebEngineView::loadStarted,this,&MyMainWindow::manageBeginLoading); connect(m_webViewer,&QWebEngineView::loadFinished,this,&MyMainWindow::manageEndLoading); } And if I add this function void MyMainWindow::manageBeginLoading() { // Set Central Frame setCentralWidget(m_webViewer); } Application works in mode Debug and in mode Release without problem. With this changes I move setCentralWidget(m_webViewer) into the function launched when signal loadStarted is emitted. But is this correct or should we deport the creation of the m_webViewer and the connections in the constructor..?
  • How can I persist cookies from QWebEngineCookieStore to QNetworkCookieJar?

    Unsolved
    1
    0 Votes
    1 Posts
    210 Views
    No one has replied
  • Persist DevTools preferences between restarts

    Unsolved
    1
    0 Votes
    1 Posts
    230 Views
    No one has replied
  • "ERR_NETWORK_ACCESS_DENIED" appears when loading local HTML with QWebEngineView

    Solved
    2
    0 Votes
    2 Posts
    468 Views
    B
    I have already solved this problem. The solution is: m_view->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessRemoteUrls, true);
  • How to build only qtwebengine on Qt 6.7 with with proprietary codecs enabled?

    Unsolved
    1
    0 Votes
    1 Posts
    601 Views
    No one has replied
  • QML: WebEngineView can't be scrolled in ScrollView (Flickable too)

    Unsolved
    1
    0 Votes
    1 Posts
    242 Views
    No one has replied
  • This topic is deleted!

    Locked Unsolved
    2
    0 Votes
    2 Posts
    14 Views
  • Error in building QT 5.15.12 from sources with QtWebEngine on VS2022

    Unsolved
    7
    0 Votes
    7 Posts
    2k Views
    Cobra91151C
    Hello! So, I added this patch: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/505412 I have successfully built QtWebEngine 5.15.14 for Visual Studio 2022. Now, this issue is resolved.
  • Migrating Settings from Qt5 to Qt6

    Solved
    3
    0 Votes
    3 Posts
    638 Views
    R
    thanks for the reply @mpergand Does that mean that on the new API, there's no way to set it as a static method so it's global for all pages and I'll have to set the profile and use it as a global variable instead of just configuring defaults at class level? EDIT: never mind, fixed it using something like this from your suggestion, thanks! QWebEngineProfile::defaultProfile()->settings()->setAttribute(QWebEngineSettings::LocalContentCanAccessFileUrls, true);
  • Web engine not installing or downloading properly

    Unsolved
    21
    0 Votes
    21 Posts
    5k Views
    JonBJ
    @Aronox QWebEngine is known to be particularly slow in Debug builds. Although I understand you are only interested in the difference in speed between the two, it would be interesting to see what that is on a Release build instead.
  • QWebEngineView closes/reopens window when added dynamically

    Solved pyside qwebengineview
    9
    0 Votes
    9 Posts
    2k Views
    A
    @somethingvague I'm also having the same problem with my application. In my case I initialize the class which contains the web engine view instance (let us say class B) after someone clicks some button in a different class(let's say A), Now both classes A and B have different UI interfaces. Can you please help me stop flicker from happening in this case? [image: 2c295871-744e-45db-8ff9-25e519eb770b.png] [image: fb00c9fd-87ef-469a-85bf-7af55e1cfc8a.png] I have shown the Class B initialization and engine setup above. I have initialized class and enigine setup before window.show() as been told in the above conversation.
  • 0 Votes
    4 Posts
    1k Views
    Axel SpoerlA
    Well, as I said, Ubuntu on arm64 is not supported.
  • setHttpHeader not wok in QWebEngineUrlRequestInfo

    Unsolved
    12
    0 Votes
    12 Posts
    902 Views
    JonBJ
    I don't know anything about it, but my guess is that it is changing the header, but you are not seeing the effect you expect/desire. What evidence do you have that it is not setting your header? After calling setHttpHeader() if you are Qt 6.5+ try calling QHash<QByteArray, QByteArray> QWebEngineUrlRequestInfo::httpHeaders() const to at least make sure your Cache-Control header is there. Or try sniffing/checking what is received at server side.
  • Can't build QtWebEngine on Windows with MSVC 2022

    Solved
    2
    0 Votes
    2 Posts
    1k Views
    T
    I ended up figuring it out... I still had the bin path for my 6.6.2 installation in my Windows PATH and I also had Qt Quick Compiler Extensions installed for 6.6.2, but not for 6.7.0. This caused the build to attempt to use qmlsc.exe from the 6.6.2 install which must have caused the issue, since the build succeeded after removing the Qt Quick Compiler Extensions module from 6.6.2 via the maintenance tool
  • [SOLVED] Cookies are no longer persistent in Qt6 with QtWebEngineQuick

    Solved
    2
    0 Votes
    2 Posts
    767 Views
    P
    I solved the issue. The cookie policy and offTheRecord properties are not enough. It is also mandatory to set a cachePath, and possibly a storageName, as following: QQuickWebEngineProfile* webEngineProfile = QQuickWebEngineProfile::defaultProfile(); webEngineProfile->setPersistentCookiesPolicy(QQuickWebEngineProfile::ForcePersistentCookies); webEngineProfile->setOffTheRecord(false); webEngineProfile->setStorageName(QStringLiteral("Default")); webEngineProfile->setCachePath(webEngineProfile->persistentStoragePath() + QStringLiteral("/Cache"));
  • Hyphenation support in QTWebEngine

    Unsolved
    1
    0 Votes
    1 Posts
    285 Views
    No one has replied
  • How to video stream in qt using url

    Moved Unsolved
    6
    0 Votes
    6 Posts
    610 Views
    X
    [1:60:0274/106115.943982:ERROR:cert_verify_proc_nss.cc(918)] CERT_PKIXVerifyCert for 10.23.108.45 failed err=-4532 js: Uncaught ReferenceError: jstProcess is not defined This error I got earlier
  • QWebEngineView fails to load GoogleMaps API

    Unsolved
    2
    0 Votes
    2 Posts
    609 Views
    T
    hi @allenck Can I ask something? i am also using google maps api v3. However, when I zoom in/out on the map, it is not as smooth as on maps.google.com. I don't know if you encounter this situation?