Open obscuren opened 9 years ago
The QtWebEngine need to be initialised prior to creating new instances of WebEngineView.
QtWebEngine
WebEngineView
#include <QtGui/QGuiApplication> #include "qtquick2applicationviewer.h" #include <qtwebengineglobal.h> int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QtWebEngine::initialize(); // <= FIX }
You'll also need to modify bridge.go and add Qt5WebEngine to pkg-config (https://github.com/go-qml/qml/blob/v1/bridge.go#L6): // #cgo pkg-config: Qt5Core Qt5Widgets Qt5Quick Qt5WebEngine.
bridge.go
Qt5WebEngine
// #cgo pkg-config: Qt5Core Qt5Widgets Qt5Quick Qt5WebEngine
I'm not sure how to properly fix this because
I'm happy to fix this and send a PR though I'll need a little direction on how to properly approach this (mostly because it locks go-qml to version 5.4).
go-qml
+1 This is a fairly important feature that needs implementing as WebEngine is a far improved web browser than WebView.
+1
The
QtWebEngine
need to be initialised prior to creating new instances ofWebEngineView
.You'll also need to modify
bridge.go
and addQt5WebEngine
to pkg-config (https://github.com/go-qml/qml/blob/v1/bridge.go#L6):// #cgo pkg-config: Qt5Core Qt5Widgets Qt5Quick Qt5WebEngine
.I'm not sure how to properly fix this because
I'm happy to fix this and send a PR though I'll need a little direction on how to properly approach this (mostly because it locks
go-qml
to version 5.4).