Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Annoying White Screen Flash Before Webkit App Loads
Forum Updated to NodeBB v4.3 + New Features

Annoying White Screen Flash Before Webkit App Loads

Scheduled Pinned Locked Moved Solved General and Desktop
windowdelaywebkitwidgetsrenderingwebkit
2 Posts 1 Posters 1.8k 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.
  • M Offline
    M Offline
    maximo
    wrote on last edited by
    #1

    I've built a Qt 5.5 widget-based application with the QWebView widget. However, unfortunately when the application loads (even when compiled and run through macdeployqt), it flashes a brief white screen for half a second before it displays the content.

    Is there anything I can do to never display the window until the HTML has finished rendering the first time?

    M 1 Reply Last reply
    0
    • M maximo

      I've built a Qt 5.5 widget-based application with the QWebView widget. However, unfortunately when the application loads (even when compiled and run through macdeployqt), it flashes a brief white screen for half a second before it displays the content.

      Is there anything I can do to never display the window until the HTML has finished rendering the first time?

      M Offline
      M Offline
      maximo
      wrote on last edited by
      #2

      I fixed it like so:

      1. Comment out the default w.show() in my main.cpp.
      2. I created a Q_INVOKABLE class method on main window called showAppWindow() that merely does a this->show().
      3. I did the steps to inject my C++ object (called cpp) into my Javascript via the C++ <==> Webkit bridge.
      4. In my index.html file, at the bottom before the ending BODY tag, I added this:
      <script type="text/javascript">
      try {
      	if (cpp) {
      		setTimeout('cpp.showAppWindow();',100);
      	}
      } catch(e){}
      </script>
      
      1 Reply Last reply
      1

      • Login

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