module "QtWebEngine" is not installed
-
wrote on 5 May 2015, 10:23 last edited by ejos 5 May 2015, 10:25
I am porting from QGraphicsWebView to QWebEngineView.
There is corresponding QML for QGraphicsWebView.
I replaced GraphicsWebView with WebEngineView.
Had included import QtWebEngine.Getting error as module "QtWebEngine" is not installed
But I have the QtWebEngine installed in my Qt directory for QML.
Kindly let me know , what is to be done to make the QtWebEngine available in QML -
wrote on 5 May 2015, 15:15 last edited by
Hi,
Two things come to my mind:- QT += webengine
- #include <QtWebEngine/qtwebengineglobal.h> and QtWebEngine::initialize(); in your main.cpp
-
wrote on 6 May 2015, 05:42 last edited by
Thanks for the reply. But still I find the same issue even after including ur suggestion :(:(
-
Thanks for the reply. But still I find the same issue even after including ur suggestion :(:(
@ejos Which Qt version are you using ?
Did you select it while installing Qt ? -
wrote on 6 May 2015, 09:23 last edited by
yes. I am using Qt 5.4
I could find the QtWebEngine folder inside the Qt/src/qml
-
@ejos Ok. Do you see
QtWebEngine
folder undergcc_64/qml
(not src) ?
On my Linux system complete path is/opt/Qt5.4.1/5.4/gcc_64/qml/QtWebEngine
viz. Qt installed directory. -
wrote on 6 May 2015, 10:03 last edited by
Yes I am able to find.
DTPC-184N:QtWebEngine user$ cd /Applications/QT/5.4/clang_64/qml/QtWebEngine
DTPC-184N:QtWebEngine user$ ls -lrt
total 416
-rw-r--r-- 1 root admin 70 Feb 13 15:55 qmldir
-rw-r--r-- 1 root admin 5786 Feb 13 15:56 plugins.qmltypes
drwxr-xr-x 5 root admin 170 Feb 13 15:56 experimental
drwxr-xr-x 10 root admin 340 Feb 13 15:56 UIDelegates
-rwxr-xr-x 1 root admin 56836 Feb 13 15:57 libqtwebengineplugin.dylib
-rwxr-xr-x 1 root admin 139492 Feb 13 15:57 libqtwebengineplugin_debug.dylib -
Yes I am able to find.
DTPC-184N:QtWebEngine user$ cd /Applications/QT/5.4/clang_64/qml/QtWebEngine
DTPC-184N:QtWebEngine user$ ls -lrt
total 416
-rw-r--r-- 1 root admin 70 Feb 13 15:55 qmldir
-rw-r--r-- 1 root admin 5786 Feb 13 15:56 plugins.qmltypes
drwxr-xr-x 5 root admin 170 Feb 13 15:56 experimental
drwxr-xr-x 10 root admin 340 Feb 13 15:56 UIDelegates
-rwxr-xr-x 1 root admin 56836 Feb 13 15:57 libqtwebengineplugin.dylib
-rwxr-xr-x 1 root admin 139492 Feb 13 15:57 libqtwebengineplugin_debug.dylib@ejos Well I'm also not sure why it not works on Mac. May be someone else with that platform knowledge would answer. Or try reinstalling it once.
QtWebEngine
is supposed to work on Mac too. https://wiki.qt.io/QtWebEngine -
wrote on 7 May 2015, 05:49 last edited by
While using QWebEngineView , Is there an option like QDeclarativeContext / QDeclarativeEngine where to QML context is set from CPP file.
-
While using QWebEngineView , Is there an option like QDeclarativeContext / QDeclarativeEngine where to QML context is set from CPP file.
@ejos No, atleast I haven't come across.
QWebEngineView
is a pure C++ class.
Did you try reinstalling ? -
wrote on 7 May 2015, 07:21 last edited by
haven't tried yet, will do that.
After including the includes QtQuick or QQml in the header file getting errors as belowIn file included from ../ssparkl/readwidget.h:21:
In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Headers/QQuickView:1:
In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Versions/5/Headers/qquickview.h:37:
In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Headers/qquickwindow.h:42:
/Applications/QT/5.4/clang_64/lib/QtQml.framework/Headers/qqml.h:62:5: error: redefinition of enumerator 'QML_HAS_ATTACHED_PROPERTIES'
QML_HAS_ATTACHED_PROPERTIES = 0x01In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Headers/QQuickView:1:
In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Versions/5/Headers/qquickview.h:37:
In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Headers/qquickwindow.h:42:
/Applications/QT/5.4/clang_64/lib/QtQml.framework/Headers/qqml.h:61:1: warning: declaration does not declare anything [-Wmissing-declarations]
enum { /* TYPEINFO flags */
^~~~
/Applications/QT/5.4/clang_64/lib/QtQml.framework/Headers/qqml.h:99:5: error: redefinition of 'qmlRegisterType'
int qmlRegisterType()kindly help to resolve this issue
-
haven't tried yet, will do that.
After including the includes QtQuick or QQml in the header file getting errors as belowIn file included from ../ssparkl/readwidget.h:21:
In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Headers/QQuickView:1:
In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Versions/5/Headers/qquickview.h:37:
In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Headers/qquickwindow.h:42:
/Applications/QT/5.4/clang_64/lib/QtQml.framework/Headers/qqml.h:62:5: error: redefinition of enumerator 'QML_HAS_ATTACHED_PROPERTIES'
QML_HAS_ATTACHED_PROPERTIES = 0x01In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Headers/QQuickView:1:
In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Versions/5/Headers/qquickview.h:37:
In file included from /Applications/QT/5.4/clang_64/lib/QtQuick.framework/Headers/qquickwindow.h:42:
/Applications/QT/5.4/clang_64/lib/QtQml.framework/Headers/qqml.h:61:1: warning: declaration does not declare anything [-Wmissing-declarations]
enum { /* TYPEINFO flags */
^~~~
/Applications/QT/5.4/clang_64/lib/QtQml.framework/Headers/qqml.h:99:5: error: redefinition of 'qmlRegisterType'
int qmlRegisterType()kindly help to resolve this issue
@ejos What did you include and where ?
-
wrote on 11 May 2015, 12:58 last edited by
The issue was with mismatch of QDeclarativeView and QQuickView use simultaneously. The issue is resolved once I changed all QDeclarativeView to QQuickView.
Thanks for replies
8/13