Official Go implementation of the Ethereum protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
go-ethereum/ui/qt/clipboard/clipboard.cpp

20 lines
419 B

#include "clipboard.h"
#include <QClipboard>
Clipboard::Clipboard()
{
connect(QApplication::clipboard(), &QClipboard::dataChanged, [this] { emit clipboardChanged();});
}
QString Clipboard::get() const
{
QClipboard *clipboard = QApplication::clipboard();
return clipboard->text();
}
void Clipboard::toClipboard(QString _text)
{
QClipboard *clipboard = QApplicationion::clipboard();
clipboard->setText(_text);
}