Qt Buttons: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Convert ExpressionEngine links)
(Cleanup)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Cleanup | reason=Auto-imported from ExpressionEngine.}}
{{LangSwitch}}
 
[[Category:Developing_with_Qt::General]]
[[Category:Developing_with_Qt::General]]
[toc align_right="yes" depth="3"]
'''English''' [[Qt_Buttons_Bulgarian|Български]] [[Qt_Buttons_Spanish|Spanish]] [[Qt_Buttons_SimplifiedChinese|简体中文]]
= Qt Buttons =
== 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 [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.
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 {{DocLink|QAbstractButton}}. QAbstractButton inherits {{DocLink|QWidget}} and it is the abstract base class of button widgets.


== Signals ==
== Signals ==
Line 17: Line 9:
QAbstractButton offers the following signals:
QAbstractButton offers the following signals:


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


== Button Types ==
== Button Types ==
Line 26: Line 18:
=== QPushButton ===
=== 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]
{{DocLink|QPushButton}} is a customizable widget for a command button. For more information and examples on how to use QPushButton please see the following article: [[How to Use QPushButton]].
 
[[Image:http://doc.qt.nokia.com/4.7/images/windowsxp-pushbutton.png|push button]]


=== QCheckBox ===
=== QCheckBox ===


[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.
{{DocLink|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]]


=== QRadioButton ===
=== QRadioButton ===


[http://doc.qt.nokia.com/4.7/qradiobutton.html QRadioButton] is a radio button with a text label.
{{DocLink|QRadioButton}} is a radio button with a text label.
 
[[Image:http://doc.qt.nokia.com/4.7/images/windows-radiobutton.png|radio button]]


=== QToolButton ===
=== QToolButton ===


[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]
{{DocLink|QToolButton}} provides a quick-access button to options which are usually used inside a {{DocLink|QToolBar}}.
 
[[Image:http://doc.qt.nokia.com/4.7/images/assistant-toolbar.png|button inside toolbar]]


== See also ==
== See also ==


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

Latest revision as of 22:36, 27 June 2015

En Ar Bg De El Es Fa Fi Fr Hi Hu It Ja Kn Ko Ms Nl Pl Pt Ru Sq Th Tr Uk Zh

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 examples on how to use QPushButton please see the following article: How to Use QPushButton.

QCheckBox

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

QRadioButton

QRadioButton is a radio button with a text label.

QToolButton

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

See also