Results 1 to 3 of 3

Thread: QMenu with a Text separator

  1. #1
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default QMenu with a Text separator

    Hi @all,

    is there a way to add a separator with text to a QMenu?
    I already tried it with a QAction (enable set to false), but the item is still selectable.

    Thanks in advance

    Best Regards
    NoRulez

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    503
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QMenu with a Text separator

    Hi, there is QAction::setSeparator, maybe you can use this.

    Ginsengelf

  3. #3
    Join Date
    Apr 2008
    Posts
    196
    Thanked 8 Times in 6 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    1

    Default Re: QMenu with a Text separator

    if i set "setSeparator()" to true, then the text is replaced with a line

Similar Threads

  1. Replies: 1
    Last Post: 17th April 2010, 20:08
  2. Separator in box layout
    By drhex in forum Qt Programming
    Replies: 1
    Last Post: 30th September 2009, 23:36
  3. QAction text color (QMenu)
    By StefanK in forum Qt Programming
    Replies: 1
    Last Post: 20th March 2009, 16:14
  4. separator in QComboBox
    By dyams in forum Qt Programming
    Replies: 3
    Last Post: 7th March 2008, 10:56
  5. adding subtitles or labels to a qmenu separator
    By dvmorris in forum Qt Programming
    Replies: 1
    Last Post: 4th September 2007, 21:59

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.