Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 5

Qt-interest Archive, November 2007
Hide QMenu


Message 1 in thread

I have a QMenu (menuSingolarityPoint) without action connected  and I 
need to hide it.
I try with menuSingolarityPoint->setVisible(false) but it don't run. The 
menu is visible.
Suggestions?

Thanks
Teo

--
 [ signature omitted ] 

Message 2 in thread

On torsdag den 29. November 2007, matteo wrote:
> I have a QMenu (menuSingolarityPoint) without action connected  and I
> need to hide it.
> I try with menuSingolarityPoint->setVisible(false) but it don't run. The
> menu is visible.

There is always a QAction, even though you might not have made it yourself.

The trick you need here is this:

parentMenu->removeAction(menuSingolarityPoint->menuAction());

Bo.

-- 
 [ signature omitted ]