Navigation

    UBports Robot Logo

    UBports Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Use Morph dialog elements in qt app?

    App Development
    3
    10
    318
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • poVoq
      poVoq last edited by

      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 🙂

      OnePlus3 (dev)

      poVoq 2 Replies Last reply Reply Quote 0
      • poVoq
        poVoq @poVoq last edited by poVoq

        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?

        OnePlus3 (dev)

        1 Reply Last reply Reply Quote 0
        • poVoq
          poVoq @poVoq last edited by

          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?

          OnePlus3 (dev)

          lduboeuf 1 Reply Last reply Reply Quote 0
          • lduboeuf
            lduboeuf @poVoq last edited by lduboeuf

            @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 ?

            poVoq 1 Reply Last reply Reply Quote 1
            • poVoq
              poVoq @lduboeuf last edited by

              @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.

              OnePlus3 (dev)

              K 1 Reply Last reply Reply Quote 0
              • K
                kugiigi @poVoq last edited by

                @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 1 Reply Last reply Reply Quote 0
                • poVoq
                  poVoq @kugiigi last edited by

                  @kugiigi hmm, so what exactly would be the benefit of importing morph.web over normal qtwebengine? Is it somehow more memory efficient or what does it exactly?

                  OnePlus3 (dev)

                  K 1 Reply Last reply Reply Quote 0
                  • K
                    kugiigi @poVoq last edited by

                    @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 1 Reply Last reply Reply Quote 0
                    • poVoq
                      poVoq @kugiigi last edited by

                      Hmm, so I tried replacing the qtwebeingine import with morph.web, but that brakes the app. And just adding morph.web to the imports doesn't seem to make any difference what so ever.

                      So what exactly is the purpose of this?

                      OnePlus3 (dev)

                      lduboeuf 1 Reply Last reply Reply Quote 0
                      • lduboeuf
                        lduboeuf @poVoq last edited by

                        @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

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post