From 10:00 CET Friday 22nd November we will adjust how the server works to deal with some recently reported problems. Therefore there may be a load problem, if you experience more problems than usual trying to access the forum then please PM AndyS or any of the moderators so they can inform me.

QWebEngineView inside of QWidget

  • Hey Qt Community,

    I was trying to create a QWebEngineView inside of an custom QWidget,
    and simply add it to it's layout.

    But for some reason, it won't update properly.

    If I add the QWebEngineView directly into a QMainWindow, everything wors fine.

    Am I missing something in custom QWidgets class?

    Example code:

    class WWebBrowser : public QWidget
    	WWebBrowser(QWidget *parent = (QWidget *)NULL);
    	virtual ~WWebBrowser();
    WWebBrowser::WWebBrowser(QWidget *parent) : QWidget(parent)
    	QVBoxLayout *l = new QVBoxLayout();
    	QWebEngineView *m_webView = new QWebEngineView(parent);
    	l->addWidget(m_webView, 1);

    Any suggestions / ideas?

  • Well, it was caused by a QGraphicsEffect on the QWidget.
    After removing it, the QWebEngineView worked without any flaws. weird.

Log in to reply