Results 1 to 3 of 3

Thread: How to access QGroupBox members?

  1. #1
    Join Date
    Feb 2009
    Posts
    22
    Thanks
    4
    Qt products
    Qt3 Qt4

    Default How to access QGroupBox members?

    I have a number of radio buttons inside a QGroupBox.
    It looks something like this

    --GroupBox----------------
    | 0 - Radio Button 1 |
    | 0 - Radio Button 2 |
    | 0 - Radio Button 3 |
    | 0 - Radio Button 4 |
    | 0 - Radio Button 5 |
    --------------------------
    The radio buttons choices are exclusive, i.e. only one radio button can be selected at any given time.

    I would like to know whether, from the QGroupBox, I can retrieve which radio button has been selected (index).
    Rather then checking each radio button to see whether it has been checked or not.

    Any suggestions or pointers will be appreciated.
    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to access QGroupBox members?

    Hi,

    have a look at QButtonGroup. That's what you are looking for.

    Lykurg

  3. The following user says thank you to Lykurg for this useful post:

    gren15 (20th March 2009)

  4. #3
    Join Date
    Feb 2009
    Posts
    22
    Thanks
    4
    Qt products
    Qt3 Qt4

    Default Re: How to access QGroupBox members?

    Thanks Lykurg.

Similar Threads

  1. access the members of the Form from a loop.
    By cbarmpar in forum Qt Programming
    Replies: 2
    Last Post: 25th September 2008, 01:35
  2. Minimum QGroupBox size
    By klnusbaum in forum Qt Programming
    Replies: 3
    Last Post: 19th June 2008, 17:22
  3. Replies: 4
    Last Post: 26th June 2007, 19:19
  4. Dynamically changing QGroupBox size
    By T4ng10r in forum Qt Programming
    Replies: 5
    Last Post: 30th March 2007, 15:02
  5. QGroupBox Issues
    By ToddAtWSU in forum Qt Programming
    Replies: 8
    Last Post: 16th January 2007, 13:45

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.