QML - extending an existing item
-
How to extend an existing WebView in QML (I mean adding background in C++) and still be able to use that in QML ?
Multiinheritance of QWebView and DeclarativeItem ? -
Hello,
I think it is posible by using Qt private headers.
-
But that means rewrite the whole public header...
-
I tried this approach but gave up after a day. This is tricky because private Qt headers are very hard to understand without Qt background knowledge.
Instead I use a QGraphicsProxyWidget with qmlRegisterType to extend and expose existing QWidget to QML.
In your case you could use QGraphicsWebView. -
You can extend them on QML
-
I am not interested in extending via QML. I have to create new item via C++ and add it (register and use) in QML/C++.
-
It all depends on what you want to do with this webview. And I think using a QGraphicsWebView that is registered as a QDeclarativeItem may be a good idea.
-
Well, does anybody have a working files, that really works, could anybody leave working example here? ... documentation is quite mean on that...