summaryrefslogtreecommitdiffstats
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorFrank Gabriel <frank.gabriel@kryptolyse.org>2018-09-28 13:17:28 +0200
committerFrank Gabriel <frank.gabriel@kryptolyse.org>2018-09-28 13:17:28 +0200
commitc6ae420c17725f0ecd3a91c48e59e8cb30561cc1 (patch)
tree8889d7aad1f6248e2cd65b8e36c870d96f5743dd /src/mainwindow.cpp
parent2ed533a994110c1926f3498b789a692023a1ef44 (diff)
Prototype for QR encoding fields
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index c92f74dc..bf905a44 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -9,6 +9,7 @@
#include "keygendialog.h"
#include "passworddialog.h"
#include "qpushbuttonwithclipboard.h"
+#include "qpushbuttonasqrcode.h"
#include "qtpass.h"
#include "qtpasssettings.h"
#include "settingsconstants.h"
@@ -1026,6 +1027,14 @@ void MainWindow::addToGridLayout(int position, const QString &field,
frame->layout()->addWidget(fieldLabel);
}
+ QPushButtonAsQRCode *qrbutton =
+ new QPushButtonAsQRCode(trimmedValue, this);
+ connect(qrbutton, &QPushButtonAsQRCode::clicked, m_qtPass,
+ &QtPass::showTextAsQRCode);
+ qrbutton->setStyleSheet("border-style: none ; background: transparent;");
+
+ frame->layout()->addWidget(qrbutton);
+
// set the echo mode to password, if the field is "password"
if (QtPassSettings::isHidePassword() && trimmedField == tr("Password")) {
QLineEdit *line = new QLineEdit();