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. QWebEngineView Flickers on Resize

QWebEngineView Flickers on Resize

Scheduled Pinned Locked Moved Unsolved General and Desktop
qwebengineviewresizeqwidget
2 Posts 2 Posters 2.1k 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.
  • E Offline
    E Offline
    Erika
    wrote on 20 Oct 2016, 23:46 last edited by Erika
    #1

    Hello, I'm learning how to work with QWebEngineView, and I noticed there are large amounts of flickering. Before I report a bug, I wanted to check that I'm using it correctly with QWidgets/QMainWindow.

    #include <QtCore>
    #include <QtWidgets\QMainWindow>
    #include <QtWebEngineWidgets>
    
    int main( int argc, char * argv[] )
    {
    	QApplication app( argc, argv );
    	QMainWindow mainWindow;
    
    	QWebEngineView *webView = new QWebEngineView;
    	webView->load( QUrl( "https://www.qt.io" ) );
    
    	mainWindow.setCentralWidget( webView );
    	mainWindow.resize( 800, 600 );
    	mainWindow.show();
    
    	return app.exec();
    }
    

    Resize Flickering Result:
    http://screencast.com/t/96xRjqJgb

    To avoid the flickering, I've tried, unsuccessfully, setting the following attributes:

    	webView->setAttribute( Qt::WA_OpaquePaintEvent, true );
    	webView->setAttribute( Qt::WA_PaintOnScreen, true );
    	webView->setAttribute( Qt::WA_DontCreateNativeAncestors, true );
    	webView->setAttribute( Qt::WA_NativeWindow, true );
    	webView->setAttribute( Qt::WA_NoSystemBackground, true );
    	webView->setAutoFillBackground( false );
    

    I've also tried nesting it under a QWidget object. I believe there is a delay between when the QMainWindow resizes, and when the QWebEngineView receives the resize event. I've done my best to look this up on stackoverflow/here/in the Qt documentation.

    I'm running Qt 5.7.0 on Windows 10, and it happens in both Debug and Release mode. Any thoughts?

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VaL Doroshchuk
      wrote on 1 Jul 2019, 15:04 last edited by
      #2

      Hi. already fixed in https://bugreports.qt.io/browse/QTBUG-46074

      1 Reply Last reply
      2

      • Login

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