support Del shortcut in several PD task dialogs

This commit is contained in:
wmayer
2019-02-27 13:36:45 +01:00
parent 070a153757
commit 10c745175f
10 changed files with 22 additions and 6 deletions

View File

@@ -110,8 +110,10 @@ void TaskLinearPatternParameters::setupUI()
{
connect(ui->buttonAddFeature, SIGNAL(toggled(bool)), this, SLOT(onButtonAddFeature(bool)));
connect(ui->buttonRemoveFeature, SIGNAL(toggled(bool)), this, SLOT(onButtonRemoveFeature(bool)));
// Create context menu
QAction* action = new QAction(tr("Remove"), this);
action->setShortcut(QString::fromLatin1("Del"));
ui->listWidgetFeatures->addAction(action);
connect(action, SIGNAL(triggered()), this, SLOT(onFeatureDeleted()));
ui->listWidgetFeatures->setContextMenuPolicy(Qt::ActionsContextMenu);