#93 - Allow memo field to be selectable + copied

This commit is contained in:
adityapk00 2019-02-02 19:04:43 -08:00
parent 97461c373b
commit d34e38cd73
1 changed files with 7 additions and 2 deletions

View File

@ -1026,12 +1026,15 @@ void MainWindow::setupTransactionsTab() {
QString memo = txModel->getMemo(index.row());
if (!memo.isEmpty()) {
QMessageBox::information(this, tr("Memo"), memo, QMessageBox::Ok);
QMessageBox mb(QMessageBox::Information, tr("Memo"), memo, QMessageBox::Ok, this);
mb.setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
mb.exec();
}
});
// Set up context menu on transactions tab
ui->transactionsTable->setContextMenuPolicy(Qt::CustomContextMenu);
// Table right click
QObject::connect(ui->transactionsTable, &QTableView::customContextMenuRequested, [=] (QPoint pos) {
QModelIndex index = ui->transactionsTable->indexAt(pos);
@ -1069,7 +1072,9 @@ void MainWindow::setupTransactionsTab() {
if (!memo.isEmpty()) {
menu.addAction(tr("View Memo"), [=] () {
QMessageBox::information(this, tr("Memo"), memo, QMessageBox::Ok);
QMessageBox mb(QMessageBox::Information, tr("Memo"), memo, QMessageBox::Ok, this);
mb.setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
mb.exec();
});
}