Results 1 to 2 of 2

Thread: How can I add a QCheckBox inside a context menu?

  1. #1
    Join Date
    Feb 2012
    Location
    Stuttgart / Germany
    Posts
    35
    Thanks
    6
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Default How can I add a QCheckBox inside a context menu?

    Hello,

    My context menu is done and working fine, but for what I need, it would be better have a checkbox, because I need to know if one of the options was selected or not.
    I know it's possible, but I didn't find a way to do that.

    My context menu has 8 actions, but some of then I can select together and some I cannot select when another one was selected before. I would like to add a check box to show to the user which option is current selected.

    How can I add a checkBox inside of a context menu?

    Someone can help me?

    Thanks in advance
    Regards

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: How can I add a QCheckBox inside a context menu?

    I think this is what you need to use.
    http://qt-project.org/doc/qt-4.8/qac...checkable-prop
    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

Similar Threads

  1. Replies: 1
    Last Post: 4th November 2011, 11:25
  2. Context menu on tab
    By wolfi3b in forum Newbie
    Replies: 2
    Last Post: 18th October 2010, 17:35
  3. Context menu
    By dejvis in forum Newbie
    Replies: 2
    Last Post: 20th September 2009, 22:02
  4. Qwt and context menu
    By giusepped in forum Qwt
    Replies: 1
    Last Post: 9th December 2008, 08:55
  5. Context Menu
    By RY in forum Newbie
    Replies: 1
    Last Post: 10th September 2008, 07:59

Tags for this Thread

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.