RadioButton Disable

Juergen Suessmaier juergen at suessmaier.de
Mon May 21 19:50:34 BST 2001


Hi,

if you want only one radio button to be checked out of a group of
radio buttons, then you may want to take a look at the QButtonGroup
class. When set to "exclusive" this class will handle checking/unchecking
the radio buttons for you. The advantage of the QButtonGroup class is
that you only need one slot for intercepting the button signals, as
each button will have an ID and the QButtonGroup emits a signal along
with the button ID for each of the button's clicked(), released() and
pressed() signals.

If more than one button can be checked out of n but specific buttons
exclude others, then the already mentioned method of connecting to the
clicked() signals and enabling/disabling all stuff that is required will
do the job.

Regards,
Juergen

> 
> Not 100% sure about exact semantics, but basically connect a slot to the toggle button's clicked() slot,
> check the state of the toggle button in the slot, and enable/disable the radio buttons as appropriate...
> 
> Steven Suson
> "Keep the faith."
> 
> 
> Alexios Beveratos wrote:
> 
> > Hello people,
> > I'm new in this list and begining to program i Qt/KDE 2. I'm trying to make
> > a frontend program for my modem. nothing fancy but it will help me learn
> > the basics. I already begun to design with Qt designer and i use Kdevelop
> > for the rest. My question is : How can i disable a radio button if a
> > certain check box is checked (mor precisely, if the box is checked i want
> > that 3 other radio buttons are diseabled from beeing checked, since it's
> > cotradictory commands). I looked at the signal/slots of the checkboxs and
> > radio buttons but didn't find anything . is it possible to do this ?
> > Thank you
> >
> > PS: I have RTFM but didn't find what i need.
> >
> > -
> > to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
> > unsubscribe »your-email-address«
> 
> 
> -
> to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
> unsubscribe »your-email-address«
> 

-- 
-------------------------------------------------------------------------
J. Süßmaier Systementwicklungen
Jürgen Süßmaier
juergen at suessmaier.de                       Realtime Software Development
Katharina Geisler Str. 14                       Embedded Applications
D-85356 Freising                                     Automation
Germany
-------------------------------------------------------------------------
                      http://www.suessmaier.de
-------------------------------------------------------------------------
      The day Microsoft makes something that doesn't suck is
        probably the day they start making vacuum cleaners
-------------------------------------------------------------------------

-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list