[Interest] Multiple Shortcuts for a single slot
Berkay Elbir
berkayelbir at gmail.com
Thu May 21 15:38:03 CEST 2015
Hello All,
I want to ask a question to you. How can I define multiple shortcuts to
single slot? I used QAction but I could not manage.
QAction *removeGroups = new QAction(this);
removeGroups->setShortcuts(QList<QKeySequence>() << Qt::Key_Delete <<
QKeySequence::Delete);
connect(removeGroups, SIGNAL(triggered()), SLOT(removeGroupWithShortCut()));
this->addAction(removeGroups); // this object is drived from QWidget.
And I want to know that what is the difference of Qt::Key_Delete and
QKeySequence::Delete ?
Thanks in advance,
BE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150521/67601c15/attachment.html>
More information about the Interest
mailing list