Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. ComboBox of HTML Select not working in QML WebView
Forum Updated to NodeBB v4.3 + New Features

ComboBox of HTML Select not working in QML WebView

Scheduled Pinned Locked Moved General and Desktop
10 Posts 2 Posters 3.5k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    drewpotter
    wrote on last edited by
    #1

    Hello,

    I have noticed that when I use the QML WebView the HTML Select ComboBox does not work at all.

    I have found a Qt demo which does support the HTML Select ComboBox but it is not using QML.

    What would be the quickest way of implementing this feature in terms of running inside QML?

    Any tips would be appreciated.

    Kind Regards,

    Drew

    1 Reply Last reply
    0
    • E Offline
      E Offline
      eliseev
      wrote on last edited by
      #2

      You must assign a selector dialog to experimental.itemSelector in your QML WebView.
      Basically, WebView does not implement selector control along with others (e.g. JS alert), it's left for users to implement them.

      See for example
      https://github.com/adobe/webkit/blob/master/Tools/MiniBrowser/qt/qml/BrowserWindow.qml
      uses
      https://github.com/adobe/webkit/blob/master/Tools/MiniBrowser/qt/qml/ItemSelector.qml

      1 Reply Last reply
      0
      • D Offline
        D Offline
        drewpotter
        wrote on last edited by
        #3

        Thanks a lot for that. I didn't realise. I have added the line:

        experimental.itemSelector: ItemSelector { }

        But I am a bit stuck for implementing the ItemSelector { }

        1 Reply Last reply
        0
        • D Offline
          D Offline
          drewpotter
          wrote on last edited by
          #4

          Does : ItemSelector automatically point to ItemSelector.qml ?

          Am I missing anything?

          1 Reply Last reply
          0
          • D Offline
            D Offline
            drewpotter
            wrote on last edited by
            #5

            Thanks !!! It is working!! Awesome!!

            1 Reply Last reply
            0
            • D Offline
              D Offline
              drewpotter
              wrote on last edited by
              #6

              Looks like I spoke too soon.

              That example works great for a few items, but I have 185 items, currencies, and this example does not work when there are 185 items.

              I guess I will have to change ItemSelector.... :/

              1 Reply Last reply
              0
              • E Offline
                E Offline
                eliseev
                wrote on last edited by
                #7

                Drew, I am glad you figured how to use the selector!
                However, example is example and you shall not just change the ItemSelector, but implement the selection widget that is most suitable for your device/screen. If you're on desktop, then I'd suggest going for QuickControls' Menu.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  drewpotter
                  wrote on last edited by
                  #8

                  Thanks Sergei,

                  I have now got an example to build upon.

                  I have no idea how to use the QuickControls to make the pop-up box.

                  I wonder if the new QtWebEngine will have the selector built-in?

                  Anyway I may have to subscribe to Qt technical support because I really have no idea how to use the QuickControls to make the pop-up.

                  But thanks for the help!

                  1 Reply Last reply
                  0
                  • E Offline
                    E Offline
                    eliseev
                    wrote on last edited by
                    #9

                    Drew,
                    I cannot tell you for the QtWebEngine. I doubt since this shall be platform-specific.
                    Quick Controls are nice and easy to work with, check their samples and you'll figure how to use Menu pop-up.

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      drewpotter
                      wrote on last edited by
                      #10

                      Thank you so much Sergei.

                      I tried and succeeded in modifying the example to do what I want.

                      Now it is also ready for mobile devices so thanks again!

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved