QPushButton Class Reference


The QPushButton widget provides a push button with a text label. (details) (complete member list)

#include <qpushbt.h>

Inherits QButton.

Public Members

Signals

Protected Members


Detailed Description

The QPushButton widget provides a push button with a text label.

To do:


Member Function Documentation

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

Constructs a push button with no text.

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

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

Constructs a push button with a text.

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

void QPushButton::adjustSize ()

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

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

See also: setAutoResizing()

bool QPushButton::autoDefault () const

Returns TRUE if the button is an auto-default button.

See also: setAutoDefault().

void QPushButton::drawButton (QPainter *paint)

Draws the button, but not the button face.

See also: drawButtonFace().

void QPushButton::drawButtonFace (QPainter *paint)

Draws the button face. The default implementation draws the button text.

This virtual function can be reimplemented by subclasses.

bool QPushButton::isDefault () const

Returns TRUE if the button is default.

See also: setDefault().

void QPushButton::setAutoDefault (bool enable)

Sets the push buttons to an auto-default button if enable is TRUE, or to a normal button if enable is FALSE.

An auto default button becomes the default push button automatically when it gets the keyboard focus.

See also: autoDefault() and setDefault().

void QPushButton::setDefault (bool enable)

Sets the button to be the default button if enable is TRUE, or to be a normal button if enable is FALSE.

See also: default().


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