Alex22
5th March 2016, 15:27
Hi
How an event can be created by pressing and holding a key like "Ctrl" button on keyboard? For example:
keyPressingHoldingEvent(QKeyEvent * event)// is there any event function for pressing and holding a key?
{
if(event->key() == Qt::Key_Control)//if "Ctrl" is pressing and holding
//do something
else
//do some other thing (if "Ctrl" is not holding)
}
How an event can be created by pressing and holding a key like "Ctrl" button on keyboard? For example:
keyPressingHoldingEvent(QKeyEvent * event)// is there any event function for pressing and holding a key?
{
if(event->key() == Qt::Key_Control)//if "Ctrl" is pressing and holding
//do something
else
//do some other thing (if "Ctrl" is not holding)
}