[PD] add shortcut to context menus
- people should be informed that there is a shortcut available (that was recently added) - make the shortcut also translatable since "Del" means nothing in e.g. German - minor code style fix in TaskDressUpParameters.h
This commit is contained in:
@@ -113,7 +113,11 @@ void TaskLinearPatternParameters::setupUI()
|
||||
|
||||
// Create context menu
|
||||
QAction* action = new QAction(tr("Remove"), this);
|
||||
action->setShortcut(QString::fromLatin1("Del"));
|
||||
action->setShortcut(tr("Del"));
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
|
||||
// display shortcut behind the context menu entry
|
||||
action->setShortcutVisibleInContextMenu(true);
|
||||
#endif
|
||||
ui->listWidgetFeatures->addAction(action);
|
||||
connect(action, SIGNAL(triggered()), this, SLOT(onFeatureDeleted()));
|
||||
ui->listWidgetFeatures->setContextMenuPolicy(Qt::ActionsContextMenu);
|
||||
|
||||
Reference in New Issue
Block a user