Use Morph dialog elements in qt app?
-
Can anyone point me to the documentation or shortly describe how to utilize the Morph build in dialog elements in a qtwebengine using qml app?
Right now I use an old version based on a uMastonauts fork, but that tried to re-implement those cut&paste etc dialogs, which are pretty broken by now.
I read on this forum that instead of linking to the pure qtwebengine in qml, one can also link to Morph and thus I guess get the benefit of those build in dialogs and maybe some other Morph specific improvements?
Thanks for the help
-
Or alternatively does anyone have a nicely working example of custom qtwebengine dialogs for a qml based webapp that I could backport?
Might be a better option in the long run if the app was ever to be ported to Plasma Mobile or such...
Edit: hmm, but I guess that would make possible future improvements to Morph in regards to push notifications impossible to use in such a webapp?
-
So according this this: https://forums.ubports.com/topic/4835/morph-web-documentation/2
It still uses the same stuff as ubuntu.web?
Is morph.web still at version 0.1?
-
@povoq yes still 0.1, but i don't think Morph.Web include all dialogs. They are set in the Morph App,e.g: https://github.com/ubports/morph-browser/blob/xenial/src/app/WebViewImpl.qml#L89 but maybe you're not talking about javascript dialog ?
-
@lduboeuf I see. Thanks.
I am actually talking about the long press items to select, cut&paste etc. but javascript messages are also important to have styled right.
-
@povoq Yeah, I think those things aren't implemented in the importable parts of Morph. They are implemented in the app and web container. You can only get the standard copy paste dialog in QtWebEngine.
-
-
@povoq I don't exactly know but I'm pretty sure there are some. If you're willing, you can try to reimplement some so that they can be used in
Morph.Web
too. -
-
@povoq maybe a look in the code of Morph.Web Webview QML type might help: https://github.com/ubports/morph-browser/blob/xenial/src/Morph/Web/MorphWebView.qml