From 32a706339cd8f22147cd3c697c525c42868807de Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Wed, 3 Jun 2020 09:12:45 +0200 Subject: [PATCH] copy hushchat addr --- src/mainwindow.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index fd1cdd6..0e42cdd 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1861,8 +1861,11 @@ void MainWindow::on_givemeZaddr_clicked() bool sapling = true; rpc->createNewZaddr(sapling, [=] (json reply) { QString hushchataddr = QString::fromStdString(reply.get()[0]); - QMessageBox::information(this, "Your new Hushchataddress",hushchataddr); - // ui->listReceiveAddresses->insertItem(0, hushchataddr); - // ui->listReceiveAddresses->setCurrentIndex(0); + QClipboard *zaddr_Clipboard = QApplication::clipboard(); + zaddr_Clipboard ->setText(hushchataddr); + QMessageBox::information(this, "Your new Hushchataddress was copied in your clipboard",hushchataddr); + ui->listReceiveAddresses->insertItem(0, hushchataddr); + ui->listReceiveAddresses->setCurrentIndex(0); + }); }