Results 1 to 3 of 3

Thread: Programatically setting radio buttons

  1. #1
    Join Date
    Jan 2006
    Location
    Berkeley California
    Posts
    109
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Programatically setting radio buttons

    I have an architecture where changes to a group of radio buttons calls a validation function which returns which radio button should then be checked (not necessarily the one the user clicked). I use "setChecked( TRUE/FALSE )" on the buttons to change them to the state they should be in but it doesn't work, the radio buttons stay in the state they were "clicked" on.

    Is there some sort of "repaint" function I need to call?

    Thanks,
    Doug

  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: Programatically setting radio buttons

    Have you tried toggle() instead?
    Are your buttons in a QButtonGroup? Because if they are, then they are auto exclusive by default, and checking one button, affects the others.

    Regards

  3. #3
    Join Date
    Jan 2006
    Location
    Berkeley California
    Posts
    109
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Programatically setting radio buttons

    Thanks.

    It turns out my problem was logic errors elsewhere.

    Doug

Similar Threads

  1. array of radio buttons
    By amulya in forum Qt Programming
    Replies: 4
    Last Post: 5th October 2006, 12:59
  2. How to get larger radio buttons on XP?
    By Ben.Hines in forum Qt Programming
    Replies: 9
    Last Post: 24th April 2006, 19:00

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.