[Qt] Please add qt_mac_set_dock_menu

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Thu Sep 20 23:18:36 CEST 2007


Hello,

I am almost finishing the first native release of the magnifier for
Mac OS X =) and with lcl-qt

One thing I noticed however is that the dock menu doesn't respond to
user commands, and because Mac OS X assigns that menu whether I want
it or not, it would be nice to make it actually work. And to do that
it's necessary to use a platform specific function present in Qt and
called qt_mac_set_dock_menu

I couldn't find documentation for this functions (where are the docs
for loose functions??), so I don't know since when it is available. If
it's available at least since 4.2, it would be nice to have it added
=)

No hurry, you can wait for more requests before adding this. I just
thougth I would comment this here so I don't forget about this.

I asked on a Qt forum but I couldn't find any other way to make the
dock menu respond to user commands. (There is a Quit menu there, so
the user should expect to see the app quit when he presses it).

http://doc.trolltech.com/qq/qq18-macfeatures.html#newlooks

"It has always been possible to change the icon on the dock by using
QApplication::setIcon(). It is now also possible to set a QMenu for
the dock icon as well. This is available through a C++ function, but
is not in a header, so you need to extern it yourself.

    QMenu *menu = new QMenu;
    // Add actions to the menu
    // Connect them to slots
    ...
    extern void qt_mac_set_dock_menu(QMenu *);
    qt_mac_set_dock_menu(menu);"

thanks,
-- 
Felipe Monteiro de Carvalho



More information about the Qt mailing list