M
M
Mercury132018-08-07 19:13:56
Qt
Mercury13, 2018-08-07 19:13:56

Qt: how to make an action with a non-working hotkey?

We have a QTableView.
There is a key written directly in it - for example, Ctrl + A.
I want to push this command into the local menu, with the corresponding hint key: "Select all / Ctrl + A".
But this should only be a hint: Ctrl+A should not work if another component is selected. A command given through the local menu should always work.
How to implement?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ighor July, 2018-08-07
@Mercury13

Make your own menu, and use aboutToShow() to change the menu itself depending on the state.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question