TxProofDialog: add copy address button

This commit is contained in:
tobtoht 2021-05-23 15:29:53 +02:00
parent 1e0450ab7a
commit 53f0356dc0
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C
2 changed files with 31 additions and 2 deletions

View file

@ -8,6 +8,7 @@
#include "libwalletqt/Transfer.h"
#include "utils/utils.h"
#include "utils/Icons.h"
TxProofDialog::TxProofDialog(QWidget *parent, QSharedPointer<AppContext> ctx, TransactionInfo *txInfo)
: QDialog(parent)
@ -44,6 +45,10 @@ TxProofDialog::TxProofDialog(QWidget *parent, QSharedPointer<AppContext> ctx, Tr
ui->radio_SpendProof->setChecked(true);
ui->label_txid->setText(m_txid);
ui->btn_copyAddress->setIcon(icons()->icon("copy.png"));
connect(ui->btn_copyAddress, &QPushButton::clicked, [this]{
Utils::copyToClipboard(ui->combo_address->currentText());
});
ui->group_summary->hide(); // todo
this->adjustSize();

View file

@ -30,7 +30,7 @@
<item>
<widget class="QRadioButton" name="radio_OutProof">
<property name="text">
<string>Prove a payment to an address (OutProof)</string>
<string>Prove payment to an address (OutProof)</string>
</property>
</widget>
</item>
@ -226,7 +226,31 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="combo_address"/>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QComboBox" name="combo_address">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="btn_copyAddress">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Copy</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>