[resolved]Post a file with qml
-
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) ?
-
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 } } }
-
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
}}