~nicohman/signal-rs

ref: f0e05ca99d0ee6e29c5ae6b2861065856a0ee523 signal-rs/qml/messages/MessageImage.qml -rw-r--r-- 453 bytes
f0e05ca9 — nicohman Reorganize QML 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import QtQuick 2.15;
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.15
import org.kde.kirigami 2.13 as Kirigami

Image { 
	id: messageImage
	width: 350
	fillMode: Image.PreserveAspectFit
	property string filePath: ""
	Component.onCompleted: {
		messageImage.source = `file://${messageImage.filePath}`;
	}
	source: ""
	MouseArea {
		anchors.fill: parent
		onClicked: {
			msgImgOver.filePath = messageImage.filePath;
			msgImgOver.open();
		}
	}

}