Updating QAction shortcuts text
-
How to update Action shortcut text after calling @QAction::setShortcut()@
without restarting app ?
-
@QAction::setShortcut(tr("<key-combo>")@
it updates the text automatically
-
after second call QAction::setShortcuts to update text I must restart app
-
well... i tried it... strangely it worked for me... does your app continue to work after the call or does it crash?
-
it does not crash
-
what exactly happens then?it just continues to work as if nothing happened? if yes, then probably the call to second setShortcut() is not being reached... you should try using a qDebug() statement to check if the execution actually reaches the second call... if you tried all this and it still doesn't work, then that's strange because it is working for me...the second call automatically updates everything...probably you should try reinstalling
-
it working because when call new shortcut(after setShortcut()) on my keyboard it run, but shortcut text in menu or in other places do not update.
-
could you give a stripped down version of how exactly you are doing it(in code)? maybe that'll shed some light on what's going on...