[Qt-interest] About Application menu item via Qt project.

Manish Chaturvedi manish_chaturvedi at persistent.co.in
Mon Jul 20 08:02:29 CEST 2009


Thanks Israel!!

-----Original Message-----
From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Israel Brewster
Sent: Friday, July 17, 2009 10:14 PM
To: qt-interest (qt-interest at trolltech.com)
Subject: Re: [Qt-interest] About Application menu item via Qt project.

On Jul 17, 2009, at 2:48 AM, Arnold Krille wrote:

> Hi,
>
> On Friday 17 July 2009 10:17:18 Manish Chaturvedi wrote:
>> I am working on a Qt/Mac application. I want to display the Version 
>> and other information of my application by clicking Menu "My 
>> Application"-> "About MyApplication" but I cannot see any such menu 
>> in my application.
>> Whereas when we create any Cocoa application it is provided by 
>> default with Application menu. Is there is any way to get this menu 
>> via Qt application?
>
> First advice: Teach your users not to double-click.
>
> Second advice: Make the forms/dialogs ignore all clicks for the first 
> 500ms after showing/creation. Maybe by "setEnabled( false )" followed 
> by "setEnabled( true )". I think these also propagate to all 
> subwidgets, so it should be save to do this on the main-widget alone.
>
> Dealing with the mouse-clicks yourself will get very complicated.

How does that have to do with an "About myApplication" menu item *grin*? The good news though: getting this menu item is easy enough:  
you simply need to add a menu item titled "About <whatever>" into one of your menus. As long as it starts with "About", Qt will recognize it and move it into the Application menu for you. See the QMenuBar documentation (http://doc.trolltech.com/4.5/qmenubar.html#details)
specifically the section titled "QMenuBar on Mac OS X". Typically I would add this menu item to a Help menu, as that would make sense on other platforms as well. Of course, you will still be responsible for making something happen when that menu item is selected, but Qt can make this easy as well: see http://doc.trolltech.com/4.5/qmessagebox.html#about
  . Although personally, I prefer to make the about dialog myself so I can have a bit more control over its appearance.

-----------------------------------------------
Israel Brewster
Computer Support Technician II
Frontier Flying Service Inc.
5245 Airport Industrial Rd
Fairbanks, AK 99709
(907) 450-7250 x293
-----------------------------------------------

>
> Have fun,
>
> Arnold
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest

DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.




More information about the Qt-interest-old mailing list