PDA

View Full Version : Popup menu title



Michiel
17th May 2007, 19:48
Is it possible with Qt to give a QMenu a title and icon at the top, similar to the system tray popup-menu's of various KDE programs (like KMail)?

I know it has a setTitle() and setIcon() function, but it looks like those are only used when the menu is a submenu.

Thanks.

wysota
17th May 2007, 21:25
Try using QWidgetAction.

Michiel
17th May 2007, 21:46
That should work. And I might use it. But a lot of KDE programs use such a title in their sys-tray icons, and all of them look identical (kmix, kopete, kboincspy, korganizer, ...). So there must be a standard way to do this. And if so, I'd rather use that than a QWidgetAction. Hm.. Perhaps that's a KDE-only way. That would make it less interesting for this application.

wysota
17th May 2007, 21:48
A lot of KDE programs use Qt3 where it was straightforward to do this.

marcel
17th May 2007, 21:48
That should work. And I might use it. But a lot of KDE programs use such a title in their sys-tray icons, and all of them look identical (kmix, kopete, kboincspy, korganizer, ...). So there must have a standard way to do this. And if so, I'd rather use that than a QWidgetAction. Hm.. Perhaps that's a KDE-only way. That would make it less interesting for this application.

The "standard" way is their way. They made it, probably somewhere in KDE Core, and they just use it there.