forked from lubuwest/Friendiqa
Version 0.002 with working FriendsTabView
This commit is contained in:
parent
bc4adba50c
commit
42de63fe63
77 changed files with 6830 additions and 387 deletions
48
v0.002/Develop/source-android/qml/PhotoUpload.qml
Normal file
48
v0.002/Develop/source-android/qml/PhotoUpload.qml
Normal file
|
@ -0,0 +1,48 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Controls 1.2
|
||||
|
||||
Item {
|
||||
Rectangle{
|
||||
property string photofile:"../images/Update.png"
|
||||
color: "grey"
|
||||
|
||||
FileDialog {
|
||||
id: fileDialog
|
||||
title: "Please choose a file"
|
||||
folder: shortcuts.pictures
|
||||
selectMultiple: true
|
||||
onAccepted: {
|
||||
photofile=fileDialog.fileUrls[0];
|
||||
console.log("You chose: " + fileDialog.fileUrls)
|
||||
// img.src=file;
|
||||
}
|
||||
onRejected: {
|
||||
console.log("Canceled")
|
||||
}
|
||||
}
|
||||
Component.onCompleted: {fileDialog.open()}
|
||||
|
||||
Image {
|
||||
id: photoFromFilesystem
|
||||
x: 20;y:50
|
||||
height: 200
|
||||
fillMode: Image.PreserveAspectFit
|
||||
source: photofile
|
||||
|
||||
onStatusChanged:{
|
||||
if (photoFromFilesystem.status == Image.Ready) {
|
||||
Layoutjs.showFriends(db)
|
||||
}
|
||||
}
|
||||
Button {
|
||||
text: "Upload"
|
||||
onClicked:{
|
||||
var login=Service.readActiveConfig(db);
|
||||
Service.uploadMedia(login,photofile, function(returnvalue){print("Upload return"+returnvalue)})
|
||||
}}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue