UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Use Morph dialog elements in qt app?

    Scheduled Pinned Locked Moved App Development
    10 Posts 3 Posters 621 Views 1 Watching
    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.
      • poVoqP Offline
        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 🙂

        Fairphone 5 (waiting for port)

        poVoqP 2 Replies Last reply Reply Quote 0
        • poVoqP Offline
          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?

          Fairphone 5 (waiting for port)

          1 Reply Last reply Reply Quote 0
          • poVoqP Offline
            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?

            Fairphone 5 (waiting for port)

            lduboeufL 1 Reply Last reply Reply Quote 0
            • lduboeufL Online
              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 ?

              poVoqP 1 Reply Last reply Reply Quote 1
              • poVoqP Offline
                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.

                Fairphone 5 (waiting for port)

                K 1 Reply Last reply Reply Quote 0
                • K Offline
                  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.

                  poVoqP 1 Reply Last reply Reply Quote 0
                  • poVoqP Offline
                    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?

                    Fairphone 5 (waiting for port)

                    K 1 Reply Last reply Reply Quote 0
                    • K Offline
                      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.

                      poVoqP 1 Reply Last reply Reply Quote 0
                      • poVoqP Offline
                        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?

                        Fairphone 5 (waiting for port)

                        lduboeufL 1 Reply Last reply Reply Quote 0
                        • lduboeufL Online
                          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