#93 - Allow memo field to be selectable + copied
This commit is contained in:
@@ -1026,12 +1026,15 @@ void MainWindow::setupTransactionsTab() {
|
|||||||
QString memo = txModel->getMemo(index.row());
|
QString memo = txModel->getMemo(index.row());
|
||||||
|
|
||||||
if (!memo.isEmpty()) {
|
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
|
// Set up context menu on transactions tab
|
||||||
ui->transactionsTable->setContextMenuPolicy(Qt::CustomContextMenu);
|
ui->transactionsTable->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
|
|
||||||
// Table right click
|
// Table right click
|
||||||
QObject::connect(ui->transactionsTable, &QTableView::customContextMenuRequested, [=] (QPoint pos) {
|
QObject::connect(ui->transactionsTable, &QTableView::customContextMenuRequested, [=] (QPoint pos) {
|
||||||
QModelIndex index = ui->transactionsTable->indexAt(pos);
|
QModelIndex index = ui->transactionsTable->indexAt(pos);
|
||||||
@@ -1069,7 +1072,9 @@ void MainWindow::setupTransactionsTab() {
|
|||||||
|
|
||||||
if (!memo.isEmpty()) {
|
if (!memo.isEmpty()) {
|
||||||
menu.addAction(tr("View Memo"), [=] () {
|
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();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user