Results 1 to 5 of 5

Thread: Qt/MacOSX preferences menu item

  1. #1
    Join Date
    Mar 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X

    Post Qt/MacOSX preferences menu item

    Hello,

    I'm developping an application with Qt (I'm working on MacOSX)!! When I run the application, a menu (with the name of the application) is created. This menu contains the preferences item and I wan't to configure it.
    So I don't know how to create the preferences dialog box and how link it with Qt !! Does Qt offer functions to configure the preferences menu item?

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt/MacOSX preferences menu item

    Quote Originally Posted by mcenatie
    Hello,

    I'm developping an application with Qt (I'm working on MacOSX)!! When I run the application, a menu (with the name of the application) is created. This menu contains the preferences item and I wan't to configure it.
    So I don't know how to create the preferences dialog box and how link it with Qt !! Does Qt offer functions to configure the preferences menu item?
    Well, not really clear... AFAIUnderstand you want to provide a dialog that allow user to customize your app. Qt does not provide such kind of dialog so you have to create your own and deal with QSettings to save the configuration in a permanent manner.
    Current Qt projects : QCodeEdit, RotiDeCode

  3. #3
    Join Date
    Mar 2006
    Posts
    4
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: Qt/MacOSX preferences menu item

    In fact, when I'm designing my main window, I have only three menus. But when I run the application, there is one more menu ! MacOS X automatically adds this menu and I wan't to know if Qt provides function to modify this menu!!

  4. #4
    Join Date
    Jan 2006
    Location
    New Malden (near London)
    Posts
    32
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11

    Default Re: Qt/MacOSX preferences menu item

    Quote Originally Posted by mcenatie
    In fact, when I'm designing my main window, I have only three menus. But when I run the application, there is one more menu ! MacOS X automatically adds this menu and I wan't to know if Qt provides function to modify this menu!!
    If you include a preferences action in your menu bar (with a name like Options or Preferences), it will end up in the Mac OS X application menu (which will have the same title as your application, in bold). Otherwise, it functions exactly as it would when it appears in its normal place in a Windows or X11 app. Everything else - the design of the preferences dialog and processing it - is your job; Qt has a QSettings class to write preferences using either Carbon preferences (on OS X), the registry (on Windows) and an XML file (on X11).

  5. #5
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Qt/MacOSX preferences menu item

    Quote Originally Posted by Matt Smith
    Qt has a QSettings class to write preferences using either Carbon preferences (on OS X), the registry (on Windows) and an XML file (on X11).
    Actually it writes an ini file on X11. I personally would have preferred an XML file because of its hierarchical structure and a more logical mapping with the Windows registry, GNOME conf, etc.
    Save yourself some pain. Learn C++ before learning Qt.

Similar Threads

  1. mapping menu item with QPushButton
    By navi1084 in forum Qt Programming
    Replies: 2
    Last Post: 15th October 2010, 21:56
  2. creating a "path" for the menu item
    By roxton in forum Qt Programming
    Replies: 4
    Last Post: 17th January 2009, 16:32
  3. Menu Item has no highlight
    By blackfox in forum Qt Programming
    Replies: 6
    Last Post: 24th September 2008, 12:17
  4. Background image on popup menu item
    By MarkoSan in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 27th June 2006, 05:55
  5. image for a custom menu Item.......
    By Naveen in forum Qt Programming
    Replies: 2
    Last Post: 23rd February 2006, 09:28

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.