Add QR code scanner
This commit is contained in:
@@ -68,6 +68,16 @@ RowLayout {
|
||||
}
|
||||
}
|
||||
|
||||
property Kirigami.Action scanAction: Kirigami.Action {
|
||||
text: i18n("Scan a QR Code")
|
||||
icon.name: "view-barcode-qr"
|
||||
onTriggered: pageStack.pushDialogLayer(Qt.createComponent("org.kde.neochat", "QrScannerPage.qml"), {
|
||||
connection: root.connection
|
||||
}, {
|
||||
title: i18nc("@title", "Scan a QR Code")
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Emitted when the text is changed in the search field.
|
||||
*/
|
||||
@@ -130,6 +140,9 @@ RowLayout {
|
||||
QQC2.MenuItem {
|
||||
action: spaceAction
|
||||
}
|
||||
QQC2.MenuItem {
|
||||
action: scanAction
|
||||
}
|
||||
}
|
||||
}
|
||||
Component {
|
||||
@@ -177,6 +190,11 @@ RowLayout {
|
||||
onClicked: menuRoot.close()
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
Delegates.RoundedItemDelegate {
|
||||
action: scanAction
|
||||
onClicked: menuRoot.close()
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user