Results 1 to 2 of 2

Thread: "Application menu" (like Mac) on all plattforms

  1. #1
    Join Date
    Jan 2006
    Posts
    11
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default "Application menu" (like Mac) on all plattforms

    Hi there,

    after plan A (implementing an application menu as in MacOS, decorated with a nice pixmap) has failed (because of a Qt bug, see http://www.qtcentre.org/forum/showthread.php?t=501), I'm thinking about a plan B. And maybe, this would be easier than a pixmap in the menubar:

    So first I ask you if it's possible to make menubar items bold? So that it'll look similar to this:
    ------------------------------------------------------------------------
    Program File Edit View Extras Settings ...
    ------------------------------------------------------------------------

    And secondly, maybe there's a Qt way to detect the systems platform? Something like this pseudo-code:
    Qt Code:
    1. if (QApplication.platform() == "mac"):
    2. makeMacApplicationMenu(macMenuBar)
    3. makeOtherMenuItems(myMenuBar)
    4. else:
    5. makeMyApplicationMenu(myMenuBar)
    6. makeOtherMenuItems(myMenuBar)
    To copy to clipboard, switch view to plain text mode 
    Is there a way with Qt3 (or maybe Qt4) to implement this platform-uniform menu?

    Thanks a lot for any advice,
    Juergen

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: "Application menu" (like Mac) on all plattforms

    Qt will create such a menu for you when running on mac as mentioned on this page:

    http://doc.trolltech.com/4.1/qtmac-as-native.html

    From my own experience, this works quite well.

    http://doc.trolltech.com/4.1/mac-dif...ile-time-flags

    should help to find out when the app runs on a mac. There are similar defines for other plattforms, sorry, can't find them atm.
    It's nice to be important but it's more important to be nice.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.