mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-17 13:30:36 -04:00
Local API binary output support + qml image example
This commit is contained in:
parent
e59366d0fd
commit
db3dad3e23
2 changed files with 53 additions and 2 deletions
43
retroshare-qml-app/src/ApiImageExample.qml
Normal file
43
retroshare-qml-app/src/ApiImageExample.qml
Normal file
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
* RetroShare Android QML App
|
||||
* Copyright (C) 2017 Gioacchino Mazzurco <gio@eigenlab.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import QtQuick 2.7
|
||||
|
||||
|
||||
Rectangle
|
||||
{
|
||||
color: "red"
|
||||
|
||||
Image
|
||||
{
|
||||
id: testImg
|
||||
height: 300
|
||||
width: 300
|
||||
}
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
rsApi.request(
|
||||
"/peers/d441e8890164a0f335ad75acc59b5a49/avatar_image",
|
||||
"", setImgCallback )
|
||||
}
|
||||
function setImgCallback(par)
|
||||
{
|
||||
testImg.source = "data:image/png;base64," + par.response
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue