Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.

Qt Buttons

From Qt Wiki
Revision as of 07:30, 7 April 2015 by Henri Vikki (talk | contribs)
Jump to navigation Jump to search


English Български Spanish 简体中文


Overview

As an advanced framework for creation of GUI Qt offers variety of buttons to satisfy different fancies. The classes that implement different types of buttons inherit QAbstractButton. QAbstractButton inherits QWidget and it is the abstract base class of button widgets.

Signals

QAbstractButton offers the following signals:

  • void clicked ( bool checked = false )
  • void pressed ()
  • void released ()
  • void toggled ( bool checked )

Button Types

QPushButton

QPushButton is a customizable widget for a command button. For more information and example how to use QPushButton please read the following article

windowsxp-pushbutton.png

QCheckBox

QCheckBox is a button that look like a checkbox with a text label next to it.

windows-checkbox.png

QRadioButton

QRadioButton is a radio button with a text label.

windows-radiobutton.png

QToolButton

QToolButton provides a quick-access button to options which are usually used inside a QToolBar

assistant-toolbar.png

See also

Basic Qt Programming Tutorial

How to Use QPushButton