0

I'm trying to create a Qt custom widget plugin to wrap a QWebEngineView. But I found QWebEngineView seems does not work with Qt Designer.

The demo code is attached as below. After build and place this plugin in Qt plugins folder, then Qt Designer will not launch correctly (No GUI window).

If I remove the line m_web = new QWebEngineView();, then the plugin can be loaded by Qt Designer correctly.

How to solve this issue?

enter image description here

#define WEBVIEWWRAPPER_H

#include <QWidget>
#include <QWebEngineView>

class WebViewWrapper : public QWidget
{
    Q_OBJECT

public:
    WebViewWrapper(QWidget *parent = 0);

private:
    QWebEngineView* m_web;
};

#endif


// webviewwrapper.cpp
#include "webviewwrapper.h"

WebViewWrapper::WebViewWrapper(QWidget *parent) :
    QWidget(parent)
{
    m_web = new QWebEngineView(); // if I remove this line, the plugin will be loaded correctly
}
ricky
  • 2,058
  • 4
  • 23
  • 49
  • You are probably missing some runtime library or runtime dependency that your plugin references, for example the Qt5WebEngineCore.dll, but the webengine has a lot more dependencies (it uses Chromium). Try running windeployqt/macdeployqt on the plugin dll. – SteakOverflow Oct 12 '17 at 11:17
  • put all dependency into qt designer plugins folder does not help – ricky Oct 12 '17 at 12:04

0 Answers0