Results 1 to 5 of 5

Thread: Popup menu title

  1. #1
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Popup menu title

    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.
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Popup menu title

    Try using QWidgetAction.

  3. #3
    Join Date
    Mar 2006
    Location
    The Netherlands
    Posts
    300
    Thanks
    9
    Thanked 29 Times in 29 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Popup menu title

    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.
    Last edited by Michiel; 17th May 2007 at 21:00. Reason: Typo
    "The strength of a civilization is not measured by its ability to wage wars, but rather by its ability to prevent them." - Gene Roddenberry

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Popup menu title

    A lot of KDE programs use Qt3 where it was straightforward to do this.

  5. #5
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Thanks
    8
    Thanked 541 Times in 521 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Popup menu title

    Quote Originally Posted by Michiel View Post
    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.

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.