Dynamic Menu in Qt Application

333 views Asked by At

I have a bunch of Dock Widgets that the User is free to close and want to provide a menu in my QMenuBar that reopens each of them individually. So possibly every time the menu is opened, the list of options will be different.

Is there any event or hook that I can use to recreate the menu whenever it is opened? The only thing I could find was the triggered event, but that is only generated after I already selected something.

Otherwise I would have to monitor all dock widget actions or I could use a timer that periodically recreates the menu - both solutions don't sound very appealing.

0

There are 0 answers