Results 1 to 3 of 3

Thread: Checkability of checkBox

  1. #1
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Checkability of checkBox

    Hi. I have a few checkboxes, and I want to do that: if one of this checkboxes is checked, others are not checkable. How to do it? I think, that
    Qt Code:
    1. checkBox->isCheckable(false);
    To copy to clipboard, switch view to plain text mode 
    Will be ok. But I have to place them in special function, and call them ofter. Is any other way to do it?

  2. #2
    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: Checkability of checkBox

    Why don't you use a QButtonGroup ( with exclusive=on) and radio buttons instead of check boxes. Although I think you can use the "exclusive" functionality of a button group with check boxes also.

    Regards

  3. #3
    Join Date
    May 2007
    Posts
    315
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Checkability of checkBox

    So, if I used QButtonGroup it means that only one button in it can be checked, and if other is checked it automatically unchecks it? And can I design QButtonGroup in Qt Designer?
    EDIT:
    but QButtonGroup radioButton emits checked() signal, not released(), clicked() or pressed(). And how to set them to be exclusive in designer? And does groupBox have the same 'exclusives'? I mean, when one is checked others aren't checkedRegards
    Last edited by Salazaar; 10th June 2007 at 21:31.

Similar Threads

  1. Replies: 3
    Last Post: 1st April 2011, 04:58
  2. exclusive checkBox
    By mickey in forum Qt Programming
    Replies: 6
    Last Post: 4th October 2007, 18:26
  3. QSpinBox with checkbox
    By :db:sStrong in forum Qt Programming
    Replies: 4
    Last Post: 17th January 2007, 13:22
  4. checkbox
    By nErnie in forum Qt Programming
    Replies: 1
    Last Post: 25th September 2006, 21:59
  5. Change Font Color of Label and CheckBox
    By mahe2310 in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 15th June 2006, 10:24

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.