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: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Add "cleanup" tag)
(Convert ExpressionEngine links)
Line 11: Line 11:
== Overview ==
== 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":http://doc.qt.nokia.com/4.7/qabstractbutton.html. QAbstractButton inherits "QWidget":http://doc.qt.nokia.com/4.7/qwidget.html and it is the abstract base class of button widgets.
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 [http://doc.qt.nokia.com/4.7/qabstractbutton.html QAbstractButton]. QAbstractButton inherits [http://doc.qt.nokia.com/4.7/qwidget.html QWidget] and it is the abstract base class of button widgets.


== Signals ==
== Signals ==
Line 26: Line 26:
=== QPushButton ===
=== QPushButton ===


"QPushButton":http://doc.qt.nokia.com/4.7/qpushbutton.html is a customizable widget for a command button. For "more information and example how to use QPushButton please read the following article":http://developer.qt.nokia.com/wiki/How_to_Use_QPushButton
[http://doc.qt.nokia.com/4.7/qpushbutton.html QPushButton] is a customizable widget for a command button. For [http://developer.qt.nokia.com/wiki/How_to_Use_QPushButton more information and example how to use QPushButton please read the following article]


[[Image:http://doc.qt.nokia.com/4.7/images/windowsxp-pushbutton.png|push button]]
[[Image:http://doc.qt.nokia.com/4.7/images/windowsxp-pushbutton.png|push button]]
Line 32: Line 32:
=== QCheckBox ===
=== QCheckBox ===


"QCheckBox":http://doc.qt.nokia.com/4.7/qcheckbox.html is a button that look like a checkbox with a text label next to it.
[http://doc.qt.nokia.com/4.7/qcheckbox.html QCheckBox] is a button that look like a checkbox with a text label next to it.


[[Image:http://doc.qt.nokia.com/4.7/images/windows-checkbox.png|checkbox]]
[[Image:http://doc.qt.nokia.com/4.7/images/windows-checkbox.png|checkbox]]
Line 38: Line 38:
=== QRadioButton ===
=== QRadioButton ===


"QRadioButton":http://doc.qt.nokia.com/4.7/qradiobutton.html is a radio button with a text label.
[http://doc.qt.nokia.com/4.7/qradiobutton.html QRadioButton] is a radio button with a text label.


[[Image:http://doc.qt.nokia.com/4.7/images/windows-radiobutton.png|radio button]]
[[Image:http://doc.qt.nokia.com/4.7/images/windows-radiobutton.png|radio button]]
Line 44: Line 44:
=== QToolButton ===
=== QToolButton ===


"QToolButton":http://doc.qt.nokia.com/4.7/qtoolbutton.html provides a quick-access button to options which are usually used inside a "QToolBar":http://doc.qt.nokia.com/4.7/qtoolbar.html
[http://doc.qt.nokia.com/4.7/qtoolbutton.html QToolButton] provides a quick-access button to options which are usually used inside a [http://doc.qt.nokia.com/4.7/qtoolbar.html QToolBar]


[[Image:http://doc.qt.nokia.com/4.7/images/assistant-toolbar.png|button inside toolbar]]
[[Image:http://doc.qt.nokia.com/4.7/images/assistant-toolbar.png|button inside toolbar]]
Line 50: Line 50:
== See also ==
== See also ==


"Basic Qt Programming Tutorial":http://developer.qt.nokia.com/wiki/Basic_Qt_Programming_Tutorial
[http://developer.qt.nokia.com/wiki/Basic_Qt_Programming_Tutorial Basic Qt Programming Tutorial]
"How to Use QPushButton":http://developer.qt.nokia.com/wiki/How_to_Use_QPushButton
[http://developer.qt.nokia.com/wiki/How_to_Use_QPushButton How to Use QPushButton]

Revision as of 15:30, 4 March 2015

This article may require cleanup to meet the Qt Wiki's quality standards. Reason: Auto-imported from ExpressionEngine.
Please improve this article if you can. Remove the {{cleanup}} tag and add this page to Updated pages list after it's clean.

[toc align_right="yes" depth="3"]

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

Qt Buttons

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

push button

QCheckBox

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

checkbox

QRadioButton

QRadioButton is a radio button with a text label.

radio button

QToolButton

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

button inside toolbar

See also

Basic Qt Programming Tutorial How to Use QPushButton