MCPcopy Create free account
hub / github.com/MITK/MITK / BindShortcut

Function BindShortcut

Modules/PythonSegmentationUI/src/QmitknnInteractiveToolGUI.cpp:93–99  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91 }
92
93 void BindShortcut(QWidget* parent, Qt::Key key, QPushButton* button,
94 const QString& tooltipTemplate)
95 {
96 button->setToolTip(tooltipTemplate.arg(KeyChar(key)));
97 auto shortcut = new QShortcut(QKeySequence(key), parent);
98 QObject::connect(shortcut, &QShortcut::activated, button, &QPushButton::click);
99 }
100
101 void SetIcon(QAbstractButton* button, const char* icon)
102 {

Callers 2

InitializeUIMethod · 0.85

Calls 1

KeyCharFunction · 0.85

Tested by

no test coverage detected