PDA

View Full Version : A menu without a menu



Radek
14th July 2013, 17:12
Continuing investigating Qt I meet a problem.

Suppose, I have a menu bar with an About menu heading on it. The About heading has no menu, it is wanted that clicking About will display an about box. No problem to create a heading without an attached menu but how to connect it? All signals seem to be emitted by clicking or otherwise manipulating menu items. There seems to be no signal emitted on clicking the About.

I have tried to (ab)use the aboutToShow() signal but it works only once. When I click About for the first time, I get the signal but then I get the signal anytime the mouse occurs over the About. Not good.

wysota
14th July 2013, 17:50
Use a toolbar instead of a menu. What you are trying to do is not a good use-case for a menu.