diff options
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9f83b1e1..b58fcb02 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" @@ -1030,6 +1031,16 @@ void MainWindow::addToGridLayout(int position, const QString &field, frame->layout()->addWidget(fieldLabel); } + if (QtPassSettings::isUseQrencode()) { + 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")) { auto *line = new QLineEdit(); |