qt - How to fire an event on correct sequence of multiple key sequence? -
hi have created event based on secret sequence of key. if user presses ctrl+alt+o event.
running code snippet
act = new qaction(this); act->setshortcut(qkeysequence(qt::ctrl + qt::alt + qt::key_o)); connect(act, signal(triggered()), this, slot(slotclose()));
now wish extend secret key. want user press 2 sequences. ctrl+alt+to ctrl+alt+y. if these 2 sequences fired in order event fired.
i doubt qkeysequences work.
sure, can!!
all need path constructor:
act->setshortcut(qkeysequence(qt::ctrl + qt::alt + qt::key_o , qt::ctrl + qt::alt + qt::key_y));
Comments
Post a Comment