Qt Forum

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

    [resolved]Post a file with qml

    QtWebEngine
    post webengineview upload
    2
    4
    2363
    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.
    • M
      modjo756 last edited by modjo756

      Hi i already post a message here about my problem (but perhaps the better choice is here). To resume, i have an apllication that use qml and a web view (build with qt5.5 msvc 2012). The navigation works fine but i need to upload a file to a device with a html page (the device is connected to the network and configured in html serveur). With the web view, when i click to the button "choose file, nothing happen. My question is, if i use webEngine (who integrate chromium) is it better (already fonctionnal) ?

      1 Reply Last reply Reply Quote 0
      • M
        modjo756 last edited by p3c0

        I make some progress, if i use webEngine (under linux with qt5.5) it works, i can upload my file with this simple code :

        import QtQuick 2.1
        import QtQuick.Controls 1.4
        import QtWebEngine 1.0
        
        ApplicationWindow {
            width: 1280
            height: 720
            visible: true
                WebEngineView {
                    id: webview
                    url: "http://www.servimg.com"
                    anchors.fill: parent
            }
        }
        

        but if i use it in a Scrollview i didn't see anything, do you know why, below the code that didn't work :

        import QtQuick 2.1
        import QtQuick.Controls 1.4
        import QtWebEngine 1.0
        
        ApplicationWindow {
            width: 1280
            height: 720
            visible: true
            ScrollView {
                width: 600
                height: 500
                WebEngineView {
                    id: webview
                    url: "http://www.servimg.com"
                    anchors.fill: parent
                }
        
            }
        }
        
        p3c0 1 Reply Last reply Reply Quote 0
        • p3c0
          p3c0 Moderators @modjo756 last edited by

          @modjo756 WebEngineView already provides Scrollbars. Why do you want to add it to ScrollView ?

          157

          1 Reply Last reply Reply Quote 0
          • M
            modjo756 last edited by

            I use this code to resolve my problem :

            Rectangle {
            width: (tabView.width)-30
            Layout.preferredHeight: 400
            z:1
            WebEngineView {
            id: webview
            url: "http://google.com"
            anchors.fill: parent
            }

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