Skip to content

QtWebEngine

Discussions and questions on QtWebEngine
1.3k Topics 4.0k Posts
  • PHP Web Developer at pokieslab

    Unsolved
    2
    0 Votes
    2 Posts
    462 Views
    G
    Hmm... That is interesting.
  • Smartcard support in Qt

    Unsolved
    1
    0 Votes
    1 Posts
    363 Views
    No one has replied
  • A problem that has been bothering me for 7 months

    Solved
    7
    0 Votes
    7 Posts
    2k Views
    K
    @JKSH said in A problem that has been bothering me for 7 months: This was in your error log. To fix it, install the Qt Positioning module. Following this, I fix it! Thanks
  • SimpleBrowser seems to freeze when resuming from screen saver

    Unsolved
    2
    1 Votes
    2 Posts
    354 Views
    W
    We fear that much knowledge about how the Qt framework produces the graphics as well as much time will be required to determine the core of this issue. So we thought about workarounds to get rid of that, by meaning of doing something that causes a "refresh" of the window when the display resumes from standby. During our recherche, we found following (to be done in the QMainWindow instance): qApp->processEvents(); update(); Unfortunately that didn't work (what surprise...). hide(); show(); or resize(...); // Change width and/or height for 1px or so Both of them worked, where hiding/showing the window may result in that users may see what is behind the browser (for a very short moment, of course). However, both of them seem to be a very amateurish way to do this. Do you have any other ideas how to force the graphics to be refreshed? Have much thanks in before, Yours Willy K.
  • Parsing a hexadecimal data and calculating checksum

    Unsolved
    9
    0 Votes
    9 Posts
    1k Views
    JonBJ
    @J-Hilk said in Parsing a hexadecimal data and calculating checksum: I think the OP's question is: "How do I take only 4 Bytes from my QByteArray, so that I can convert it into an int32?" @jsulm nope, it just exists when the size doesn't match So if you want to access 4 bytes (sizeof(int32)) for conversion use QByteArray QByteArray::mid(qsizetype pos, qsizetype len = -1) const. Otherwise if you want it to appear as an array of int32 (and you know byte ordering is correct) use reinterpret_cast<> to int array on the data.
  • How do i parse string arrays in qt?

    Solved
    8
    0 Votes
    8 Posts
    1k Views
    jsulmJ
    @Rumeysa_135 I gave you a link to a method to convert a hex string to an integer and @Emre-MUTLU gave you code to split a string into hex numbers. You should now be good to go and write what you need. If something is not clear then please ask concrete questions and provide more details.
  • Does Qt support the Clipboard API? How do I use it?

    Unsolved
    2
    0 Votes
    2 Posts
    735 Views
    R
    A bug? https://bugreports.qt.io/browse/QTBUG-77450
  • QTWebengine crash with: unable to find resource: 16079

    Unsolved
    3
    0 Votes
    3 Posts
    518 Views
    S
    I think it is Qt, becouse in resource_bundle.cc I find this: auto data_pack = std::make_unique<DataPack>(ui::SCALE_FACTOR_NONE); if (!locale_path.empty() && data_pack->LoadFromPath(locale_path)) { locale_resources_data_ = std::move(data_pack); } else { locale_resources_data_ = std::make_unique<DataPack>(ui::SCALE_FACTOR_NONE); } ```then (secondary_locale_resources_data_.get() && secondary_locale_resources_data_->GetStringPiece( static_cast<uint16_t>(resource_id), &data)) if false and thats why I get this error. My locale: LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL= What is "DataPack" ?
  • 0 Votes
    3 Posts
    22k Views
    G
    Try using the exact, or absolute, path. The terms absolute and relative also have their usual English meaning. A relative path shows where something is relative to some start point; an absolute path is a location starting from the top. When you open a file with the name “filename.ext”; you are telling the open() function that your file is in the current working directory . This is called a relative path. file = open('filename.ext') //relative path In the above code, you are not giving the full path to a file to the open() function, just its name - a relative path. The error “FileNotFoundError: [Errno 2] No such file or directory” is telling you that there is no file of that name in the working directory. So, try using the exact, or absolute path. file = open(r'C:\path\to\your\filename.ext') //absolute path In the above code, all of the information needed to locate the file is contained in the path string - absolute path. It's a common misconception that relative paths are relative to the location of the python script, but this is untrue. Relative file paths are always relative to the current working directory, and the current working directory doesn't have to be the location of your python script. . In order to make this work, the directory containing the python executable must be in the PATH, a so-called environment variable that contains directories that are automatically used for searching executables when you enter a command. In any case, if your Python script file and your data input file are not in the same directory, you always have to specify either a relative path between them or you have to use an absolute path for one of them.
  • 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
    459 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
    334 Views
    No one has replied
  • pyqt5 QWebEngineView turns black screen after long time running?

    Unsolved
    2
    0 Votes
    2 Posts
    494 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
    453 Views
    CesarC
    Someone else?
  • ERR_NETWORK_ACCESS_DENIED pops up when I run html file

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

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

    Unsolved
    2
    0 Votes
    2 Posts
    411 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
    481 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
    340 Views
    No one has replied