Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Stale content briefly seen in QWebEngineView upon show
Forum Updated to NodeBB v4.3 + New Features

Stale content briefly seen in QWebEngineView upon show

Scheduled Pinned Locked Moved Unsolved QtWebEngine
1 Posts 1 Posters 234 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nightblade
    wrote on last edited by
    #1

    I'm using PySide6 (but my challenge doesn't seem Python related) and I have a simple project that has a QMainWindow that contains a QWebEngineView.

    The idea is to run this alongside another (non Qt) app and be able to show and hide the Qt window+browser (based on outside considerations), and when the window is shown I want to apply a new URL. It's working pretty well, except that on a subsequent show I see the previous website until the new one starts to paint.

    I tried various things that didn't help, including setHtml() to set a blank HTML page before hiding or before showing, but I guess the QWebEngineView doesn't render when hidden, and event loop async stuff is probably complicating things.

    I would rather the window re-appear completely white before the next webpage gets going.

    As an abstract sketch, consider this sequence:

    window.browser.setUrl(QUrl(SITE_ONE))
    window.show()
    

    ... then later

    window.hide()
    

    ... then later

    window.browser.setUrl(QUrl(SITE_TWO))
    window.show()
    

    So basically at this point of the sequence, when show() is called the second time,I get a glimpse of SITE_ONE, until SITE_TWO gets to be painted.

    (I suppose it's possible that it's a general widget bitmap-cache issue, not QWebEngineView specific?)

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved