mirror of https://github.com/ethereum/go-ethereum
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.
20 lines
419 B
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);
|
|
}
|
|
|