Skip to content

QtWebEngine

Discussions and questions on QtWebEngine
1.3k Topics 4.0k Posts
  • QtWebEngine cannot run as root or no-sandbox

    Solved
    3
    0 Votes
    3 Posts
    2k Views
    J
    Alright i figured it out! I don't know why i didn't build QT in debug mode to begin with but just slipped my mind... Anyways i rebuild the whole thing in DEBUG mode and then i got a MUCH better error output: QEglFSVivIntegration will set environment variable FB_MULTI_BUFFER=2 to enable double buffering and vsync. If this is not desired, you can override this via: export QT_EGLFS_IMX6_NO_FB_MULTI_BUFFER=1 [636:649:0118/130831.434403:FATAL:udev_loader.cc(38)] Check failed: false. #0 0xffff99fb014c <unknown> #1 0xffff99db42dc <unknown> #2 0xffff99df2408 <unknown> #3 0xffff96652f24 <unknown> #4 0xffff9664f63c <unknown> #5 0xffff966511a4 <unknown> #6 0xffff968d80c8 <unknown> #7 0xffff968d9de0 <unknown> #8 0xffff968d9a4c <unknown> #9 0xffff968d93d4 <unknown> #10 0xffff968d8e48 <unknown> #11 0xffff9578e008 <unknown> #12 0xffff99db4bfc <unknown> #13 0xffff99e14b90 <unknown> #14 0xffff99e14cc8 <unknown> #15 0xffff99e14fa4 <unknown> #16 0xffff99fe3284 <unknown> #17 0xffff99e144c8 <unknown> #18 0xffff99e7afdc <unknown> #19 0xffff99f388cc <unknown> #20 0xffff98acbc1c <unknown> #21 0xffff98acb8a8 <unknown> #22 0xffff99f38ef8 <unknown> #23 0xffff99fd4920 <unknown> #24 0xffff92b632ac <unknown> #25 0xffff92bc7b9c <unknown> Received signal 6 #0 0xffff99fb014c <unknown> #1 0xffff99db42dc <unknown> #2 0xffff99faf1ec <unknown> #3 0xffffa3732604 ([vdso]+0x603) #4 0xffff92b64de0 <unknown> #5 0xffff92b2277c raise #6 0xffff92b0ff1c abort #7 0xffff99fae990 <unknown> #8 0xffff99fae9b8 <unknown> #9 0xffff99df2808 <unknown> #10 0xffff96652f24 <unknown> #11 0xffff9664f63c <unknown> #12 0xffff966511a4 <unknown> #13 0xffff968d80c8 <unknown> #14 0xffff968d9de0 <unknown> #15 0xffff968d9a4c <unknown> #16 0xffff968d93d4 <unknown> #17 0xffff968d8e48 <unknown> #18 0xffff9578e008 <unknown> #19 0xffff99db4bfc <unknown> #20 0xffff99e14b90 <unknown> #21 0xffff99e14cc8 <unknown> #22 0xffff99e14fa4 <unknown> #23 0xffff99fe3284 <unknown> #24 0xffff99e144c8 <unknown> #25 0xffff99e7afdc <unknown> #26 0xffff99f388cc <unknown> #27 0xffff98acbc1c <unknown> #28 0xffff98acb8a8 <unknown> #29 0xffff99f38ef8 <unknown> #30 0xffff99fd4920 <unknown> #31 0xffff92b632ac <unknown> #32 0xffff92bc7b9c <unknown> [end of stack trace] Calling _exit(1). Core file will not be generated. It seems Chromium is trying to use udev dynamically BUT i am running a busybox system with NO udev, so makes sense. There didn't seem to be any sort of configuration option in QT5 itself to disable chromium's udev that i could find BUT the version of chromium used had that option so i had to patch the QTWebEngine config file linux.pri: diff --git a/qtwebengine/src/core/config/linux.pri b/qtwebengine/src/core/config/linux.pri index eaecab3c9..e4392aa78 100644 --- a/qtwebengine/src/core/config/linux.pri +++ b/qtwebengine/src/core/config/linux.pri @@ -12,7 +12,7 @@ gn_args += \ use_gio=false \ use_gnome_keyring=false \ linux_use_bundled_binutils=false \ - use_udev=true \ + use_udev=false \ use_bundled_fontconfig=false \ use_sysroot=false \ enable_session_service=false \ I then rebuilt and it's now working wonderfully!!!! At least from my minimal testing haha, i have a website displaying from my app!
  • How to animate a QSplitter?

    Unsolved
    2
    0 Votes
    2 Posts
    433 Views
    SGaistS
    Hi and welcome to devnet, From the top of my head, I would rather animate the handle than the widget that is in the splitter.
  • QML type WebEngineView crashed with eglGetProcAddress not found

    Unsolved
    1
    0 Votes
    1 Posts
    315 Views
    No one has replied
  • pyqt5 QWebEngineView turns black screen after long time running?

    Unsolved
    2
    0 Votes
    2 Posts
    446 Views
    A
    @ArthurPYQT QGuiApplication.setAttribute(Qt.ApplicationAttribute.AA_UseSoftwareOpenGL) QCoreApplication.setAttribute(Qt.ApplicationAttribute.AA_UseSoftwareOpenGL) QApplication.setAttribute(Qt.ApplicationAttribute.AA_UseSoftwareOpenGL) after set these attributes above, everytime I start the program, the cmd line reads: ARB::createContext: wglCreateContextAttribsARB() failed (GL error code: 0x0) for format: QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize -1, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize -1, samples -1, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile), shared context: 0x2 (operation done.) GDI::createContext: wglCreateContext failed. (operation done.) Unable to create a GL Context. qt.qpa.backingstore: composeAndFlush: QOpenGLContext creation failed qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
  • High cpu usage when moving a gui containing a QtWebEngine and WA_TranslucentBackground

    Unsolved
    2
    0 Votes
    2 Posts
    425 Views
    CesarC
    Someone else?
  • ERR_NETWORK_ACCESS_DENIED pops up when I run html file

    Unsolved
    1
    0 Votes
    1 Posts
    425 Views
    No one has replied
  • Embed a QWebEngineView in a VS dialog box

    Unsolved
    1
    0 Votes
    1 Posts
    237 Views
    No one has replied
  • WebEngineView not resizing on Mac

    Unsolved
    2
    0 Votes
    2 Posts
    395 Views
    A
    @Nineswiss said in WebEngineView not resizing on Mac: On initial load I can resize the WebEngineView when I resize the main window, however once I navigate to another url, when I resize the window the WebViewEngine stays the original size. import QtQml import QtQuick import QtQuick.Window import QtWebEngine Window { width: 1024 height: 768 visible: true title: qsTr("Hello World") WebEngineView{ anchors.fill: parent url: "https://google.com" } onWidthChanged: { engineView.width = width } onHeightChanged: { engineView.height = height } }
  • Spotify not working on Qt6 WebEngine with codecs and drm support

    Unsolved
    1
    0 Votes
    1 Posts
    470 Views
    No one has replied
  • Saving images on QWebEngine

    Unsolved
    4
    0 Votes
    4 Posts
    1k Views
    H
    Just wanted to add for future readers that I came up with a simple workaround: First you check in your browser's custom context menu if an image was right-clicked: if self.page().contextMenuData().mediaType() == 1: #test if an image was clicked (img = 1, video = 2, audio = 3) self.menus = QMenu() imgurl = self.page().contextMenuData().mediaUrl() action1 = QAction("Save image to disk", self) self.menus.addAction(action1) self.menus.popup(event.globalPos()) action1.triggered.connect(lambda imgsave: self.saveimg(imgurl)) This sends the image's url to a custom function that saves the image using Python's requests library. def saveimg(self, imgurl): fileurl = imgurl.toString() #needs to be string response = requests.get(fileurl) filename = fileurl.split("/")[-1] #get filename from url dlfolder = "downloads/" #put your desired folder path here file_path = os.path.join(dlfolder, filename) open(file_path, "wb").write(response.content)
  • Does QtWebEngine enable HTTP/2 or QUIC?

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

    Unsolved
    4
    0 Votes
    4 Posts
    87 Views
  • QWebEnginePage es6 modules

    Solved
    2
    0 Votes
    2 Posts
    634 Views
    S
    I figured out a solution. Instead of loading files using the file:/// protocol, I used a custom scheme. I then used QWebEngineUrlSchemeHandler:requestStarted to open the files and attach them to QWebEngineUrlRequestJob. void UrlSchemeHandler::requestStarted(QWebEngineUrlRequestJob* request) { QByteArray requestMethod = request->requestMethod(); QUrl requestUrl = request->requestUrl(); QString requestPath = requestUrl.path(); QFile* file = new QFile(requestPath); file->setParent(request); Z_VERIFY(connect(request, &QObject::destroyed, file, &QFile::deleteLater)); if (!file->exists() || file->size() == 0) { request->fail(QWebEngineUrlRequestJob::UrlNotFound); return; } QFileInfo fileInfo = QFileInfo(*file); QMimeDatabase mimeDatabase; QMimeType mimeType = mimeDatabase.mimeTypeForFile(fileInfo); request->reply(QUrl(mimeType.name()).toEncoded(), file); }
  • 0 Votes
    4 Posts
    989 Views
    C
    anyone have idea?
  • QWebEngineCallback? &resultCallback? How does it work?

    Solved callback qwebengine tohtml
    3
    0 Votes
    3 Posts
    1k Views
    D
    @JonB Thank you so much! I see this is different than I thought. Works good!
  • Build QtWebEngine with Python3.

    Unsolved
    2
    0 Votes
    2 Posts
    406 Views
    jsulmJ
    @jiapei1000 Please post the actual error - it should be somewhere above of what you posted.
  • How to use copy and paste in QWebEngineView

    Unsolved
    2
    0 Votes
    2 Posts
    531 Views
    H
    I have the same problem, but in PyQt 5. Ended up using an alternative solution with an external "keyboard" library that mimics keyboard presses: if self.page().contextMenuData().isContentEditable() == True: #check if an input field was right-clicked self.menus = QMenu() action1 = QAction("Paste text", self) self.menus.addAction(action1) self.menus.popup(event.globalPos()) action1.triggered.connect(self.paste_into_field) def paste_into_field(self): keyboard.press_and_release("ctrl+v")
  • QWebEngineView with proxy on linux

    Unsolved
    2
    0 Votes
    2 Posts
    1k Views
    S
    我也遇到了相同的问题 I had the same problem
  • 0 Votes
    8 Posts
    2k Views
    JKSHJ
    @RicTa said in WebEngine Nanobrowser not able to pass Antibot Validation: indeed in the meantime I have open this bug here: https://bugreports.qt.io/browse/QTBUG-107451 please let me know in case I made some mistakes in creating it. thanks a lot for you support Thanks! Your bug report looks fine to me, and I see that you are having a productive discussion with an engineer who is working on Qt WebEngine.
  • Use lazy loading in QWebEngine

    Unsolved
    1
    0 Votes
    1 Posts
    324 Views
    No one has replied