Mac: How to display a context menu for a toolbar, when it's made "unifiedTitleAndToolBarOnMac"?



  • I use "unifiedTitleAndToolBarOnMac" to make the Mac version of my app look "native". I also want to display a context menu (right-click menu) for the toolbar, like you can do for the toolbar in Finder. I tried all possible ways that I found in the doc - they don't work. Can anyone help, please?



  • Thanks tamhanna, but this will not work. My situation is specific for the tool bar, when the main window has setting unifiedTitleAndToolBarOnMac.

    I tried all means that I know to catch an event from the mouse click - I do not get any events. When unifiedTitleAndToolBarOnMac is ON, the toolbar becomes a part of the window header - you can drag the whole window by dragging the unused part of the toolbar. And it looks like Qt cancels all events.

    Native Mac OS X apps do not cancel all events in this case. You can always right-click on such unified toolbar in a native Mac OS X app. Try Finder for example.



  • There is bug report "QTBUG-11271":http://bugreports.qt.nokia.com/browse/QTBUG-11271 open for this issue. You can go to the bug tracker and vote for the ticket, this may speed up the fix a bit.



  • [quote author="tamhanna" date="1291459510"]Hi,
    I use this to fake a context menu in my Qt for Symbian app:@
    [/quote]
    Is this for older Symbians? I thought Symbian^3 supports context menu at touch location. At least that was one of the big changes in the UI. I don't know if Qt has caught up with that yet.



  • event filter can be a good workaround for any event-related issues


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.