12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- import QtQuick 2.12
- import QtQuick.Controls 2.12
- Item {
- anchors.fill: parent
- visible: true
- width: 640
- height: 480
- Row {
- id: toolBar
- spacing: 10
- Text {
- id: scannerName
- text: "Scanner: " + scanner.scannerName
- }
- Button {
- text: "Scan"
- onClicked: {
- scanner.scan();
- }
- }
- }
- Flickable {
- clip: true
- anchors {
- top: toolBar.bottom
- bottom: parent.bottom
- left: parent.left
- right: parent.right
- }
- contentWidth: preview.width
- contentHeight: preview.height
- Image {
- id: preview
- width: implicitWidth
- height: implicitHeight
- source: scanner.scannedImage != "" ? "data:image/png;base64," + scanner.scannedImage : ""
- }
- }
- }
|