Results 1 to 3 of 3

Thread: how to check radio button

  1. #1
    Join Date
    Nov 2007
    Posts
    103
    Thanks
    71
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default how to check radio button

    Hi,

    I just can't find how to initially set one of my radio buttons to "checked". What's the function? Thanks.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: how to check radio button

    Notice that QRadioButton inherits QAbstractButton. Take a look at QAbstractButton docs, it offers what you want..
    J-P Nurmi

  3. #3
    Join Date
    May 2010
    Posts
    86
    Thanks
    17
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to check radio button

    Quote Originally Posted by tommy View Post
    Hi,

    I just can't find how to initially set one of my radio buttons to "checked". What's the function? Thanks.
    ui->radioButton->setChecked(true);

  4. The following user says thank you to falconium for this useful post:

    JazzKatua (23rd June 2013)

Similar Threads

  1. QTreeWidgetItem + radio Button
    By desch in forum Qt Programming
    Replies: 5
    Last Post: 14th November 2007, 15:15
  2. Undoing radio button checks.
    By Doug Broadwell in forum Qt Programming
    Replies: 1
    Last Post: 22nd May 2007, 10:12
  3. array of radio buttons
    By amulya in forum Qt Programming
    Replies: 4
    Last Post: 5th October 2006, 13:59
  4. Paint XP radio button to pixmap
    By Ben.Hines in forum Qt Programming
    Replies: 2
    Last Post: 26th April 2006, 22:15

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.