shortcut with more than one key
I am trying to create a shortcut that uses a multi-key combination for a widget.
This works:
Code:
(void) new QShortcut(Qt
::Key_F5,
this,
SLOT(refresh
()));
// refresh
This doesnt:
Code:
(void) new QShortcut(Qt
::Key_Shift + Qt
::Key_C,
this,
SLOT(clear
()));
// clear
I also tried this, but it does not work either.
Do i need to override keyPressEvent or is QShortcut capable of handling Shift+C some other way?
Thanks in advance.
Re: shortcut with more than one key
i just realized that I should be using Qt::SHIFT instead of Qt::Key_Shift.
This is somewhat confusing. What is the difference between the two?