QRadioButton Class Reference


The QRadioButton widget provides a radio button with a text label. (details) (complete member list)

#include <qradiobt.h>

Inherits QButton.

Public Members

Protected Members


Detailed Description

The QRadioButton widget provides a radio button with a text label.

QRadioButton and QCheckBox are both toggle buttons, that is, they can be switched on (checked) or off (unchecked). Unlike check boxes, radio buttons are normally organized in groups where only one radio button can be switched on at a time.

The QButtonGroup widget is very useful for defining groups of radio buttons.


Member Function Documentation

QRadioButton::QRadioButton (QWidget *parent=0, const char *name=0)

Constructs a radio button with no text.

The parent and name arguments are sent to the QWidget constructor.

QRadioButton::QRadioButton (const char *text, QWidget *parent=0, const char *name=0)

Constructs a radio button with a text.

The parent and name arguments are sent to the QWidget constructor.

void QRadioButton::adjustSize ()

Adjusts the size of the radio button to fit the contents.

This function is called automatically whenever the contents change and auto-resizing is enabled.

See also: setAutoResizing()

void QRadioButton::drawButton (QPainter *paint)

Draws the radio button.

bool QRadioButton::isChecked () const

Returns TRUE if the radio button is checked, or FALSE if it is not checked.

See also: setChecked().

void QRadioButton::setChecked (bool checked)

Checks the radio button if checked is TRUE, or unchecks it if checked is FALSE.

Calling this function does not affect other radio buttons unless a radio button group has been defined using the QButtonGroup widget.

See also: isChecked().


This file is part of the Qt toolkit, copyright 1995 Troll Tech, all rights reserved.

It was generated from the following files:


Generated at 04:27, 1995/05/20 by the webmaster at Troll Tech