Results 1 to 5 of 5

Thread: problem in QRadioButton

  1. #1
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default problem in QRadioButton

    hi friends,
    i am having three radioButtons say "alt", "ctrl" , "del" and the default is alt "checked" ..
    when the user try clicks a pushbutton i want to uncheck the alt so i set
    alt.setChecked(false)
    but it is not working why ... and another thing is i disabled the remaining two radioButton
    please help

  2. #2
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem in QRadioButton

    Since radio buttons present user with one of the many choice, selecting no choice may not possible and therefore setChecked(false) is not working.

  3. #3
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: problem in QRadioButton

    Quote Originally Posted by munna View Post
    Since radio buttons present user with one of the many choice, selecting no choice may not possible and therefore setChecked(false) is not working.
    set QAbstractPushButton::setAutoExclusive in false and you can check/uncheck radiobuttons.
    Qt Assistant -- rocks!
    please, use tags [CODE] & [/CODE].

  4. #4
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem in QRadioButton

    Quote Originally Posted by spirit View Post
    set QAbstractPushButton::setAutoExclusive in false and you can check/uncheck radiobuttons.
    Right. My Bad.

  5. #5
    Join Date
    Sep 2008
    Location
    Bangalore
    Posts
    659
    Thanks
    116
    Thanked 42 Times in 41 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem in QRadioButton

    Quote Originally Posted by spirit View Post
    set QAbstractPushButton::setAutoExclusive in false and you can check/uncheck radiobuttons.
    working perfectly ...
    alt.setAutoExclusive( false );
    alt.setChecked( false );
    alt.setAutoExclusive( true );
    thank you ...

Similar Threads

  1. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  2. QRadioButton Sizing problem.
    By Cutey in forum Qt Programming
    Replies: 0
    Last Post: 6th August 2008, 13:40
  3. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  4. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.