From 9a8e943e70b943f73fd5ce03a98351ecc22af339 Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Mon, 26 Aug 2024 13:25:07 +0200 Subject: [PATCH] Add accelerators to EditableModelView --- src/widgets/helper/EditableModelView.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/widgets/helper/EditableModelView.cpp b/src/widgets/helper/EditableModelView.cpp index c2d9ee6c7..c364afa6b 100644 --- a/src/widgets/helper/EditableModelView.cpp +++ b/src/widgets/helper/EditableModelView.cpp @@ -41,14 +41,14 @@ EditableModelView::EditableModelView(QAbstractTableModel *model, bool movable) vbox->addLayout(buttons); // add - QPushButton *add = new QPushButton("Add"); + QPushButton *add = new QPushButton("&Add"); buttons->addWidget(add); QObject::connect(add, &QPushButton::clicked, [this] { this->addButtonPressed.invoke(); }); // remove - QPushButton *remove = new QPushButton("Remove"); + QPushButton *remove = new QPushButton("&Remove"); buttons->addWidget(remove); QObject::connect(remove, &QPushButton::clicked, [this] { auto selected = this->getTableView()->selectionModel()->selectedRows(0); @@ -71,14 +71,14 @@ EditableModelView::EditableModelView(QAbstractTableModel *model, bool movable) if (movable) { // move up - QPushButton *moveUp = new QPushButton("Move up"); + QPushButton *moveUp = new QPushButton("&Move up"); buttons->addWidget(moveUp); QObject::connect(moveUp, &QPushButton::clicked, this, [this] { this->moveRow(-1); }); // move down - QPushButton *moveDown = new QPushButton("Move down"); + QPushButton *moveDown = new QPushButton("M&ove down"); buttons->addWidget(moveDown); QObject::connect(moveDown, &QPushButton::clicked, this, [this] { this->moveRow(1);