[Qt-interest] Toolbars on Mac and the title bar context menu (corrected)
David Boosalis
david.boosalis at gmail.com
Wed Aug 19 08:32:06 CEST 2009
The createPopupMenu() is a virtual method for the QMainWindow class.
You can create your own such method that returns a null pointer, but
then if you are using docking widgets there will be no context menu
for these.
On Tue, Aug 18, 2009 at 9:57 PM, Tony
Rietwyk<tony.rietwyk at rightsoft.com.au> wrote:
> Hi Everybody,
>
> I have an application with a QMainWindow derived main window. It has two toolbars - only one is shown at any time, depending on the context. When the context changes, the toolbars are switched, and the hidden toolbar is also made disabled.
>
> I accidently right-clicked on the title bar of the application and it showed a popup menu containing two entries both with text "toolbar" and one has a check mark. I was amazed to find that clicking on the menu entry that is not checked, shows the hidden toolbar - and makes it enabled!
>
> How do I stop the context menu from appearing? None of the window attribute or type enums seem appropriate.
>
> Failing that, how can I change the text displayed for each toolbar? I have changed the Window Title of each toolbar from the default, but that doesn't change the text in the title bar context menu. [Correction - my mistake - the items do refelct the Window Title].
>
> Thanks in advance,
>
> Tony.
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list