Widgets

Widgets are all derived by baseclass QWidget.

Most common Qt widgets

QLabel QComboBox QCheckBox QRadioButton QPushButton QTableWidget QLineEdit QSlider QProgressBar

QWidget

Ref: C++ - PySide

The QWidget class is the base class of all user interface objects.

Often used properties/methods:


QCheckBox

Ref: C++ - PySide

windows-checkbox

A QCheckBox is an option button that can be switched on (checked) or off (unchecked). Checkboxes are typically used to represent features in an application that can be enabled or disabled without affecting others. Different types of behavior can be implemented. For example, a QButtonGroup can be used to group check buttons logically, allowing exclusive checkboxes. However, QButtonGroup does not provide any visual representation.

QCheckBox => QAbstractButton => QWidget => QObject


QComboBox

Ref: C++ - PySide

QComboBox

A QComboBox provides a means of presenting a list of options to the user in a way that takes up the minimum amount of screen space.

A combobox is a selection widget that displays the current item, and can pop up a list of selectable items. A combobox may be editable, allowing the user to modify each item in the list.


QFrame

Ref: C++

QFrame

The QFrame class is the base class of widgets that can have a frame.

QMenu uses this to "raise" the menu above the surrounding screen. QProgressBar has a "sunken" look. QLabel has a flat look. The frames of widgets like these can be changed.


QLabel

Ref: C++ - PySide

windows-label

QLabel is used for displaying text or an image. No user interaction functionality is provided. The visual appearance of the label can be configured in various ways, and it can be used for specifying a focus mnemonic key for another widget.


QLineEdit

Ref: C++ - PySide

QLineEdit

A line edit allows the user to enter and edit a single line of plain text with a useful collection of editing functions, including undo and redo, cut and paste, and drag and drop (see setDragEnabled()).


QListWidget

Ref: C++ - PySide

windows-listview

The QListWidget class provides an item-based list widget.


QProgressBar

Ref: C++

The QProgressBar widget provides a horizontal or vertical progress bar.


QPushButton

Ref: C++ - PySide

plastique-pushbutton

The QPushButton widget provides a command button.


QRadioButton

Ref: C++ - PySide

windows-radiobutton

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


QSlider

Ref: C++

windows-slider

The QSlider widget provides a vertical or horizontal slider.


QSplitter

Ref: C++ PySide

QSplitter

The QSplitter class implements a splitter widget.

A splitter lets the user control the size of child widgets by dragging the boundary between them. Any number of widgets may be controlled by a single splitter. The typical use of a QSplitter is to create several widgets and add them using insertWidget() or addWidget().


QTableWidget

Ref: C++ - PySide

windows-tableview

The QTableWidget class provides an item-based table view with a default model.

Table widgets provide standard table display facilities for applications. The items in a QTableWidget are provided by QTableWidgetItem.


QTreeView

Ref: C++ PySide

(Model/View)

windows-treeview

The QTreeView class provides a default model/view implementation of a tree view.

A QTreeView implements a tree representation of items from a model. This class is used to provide standard hierarchical lists that were previously provided by the QListView class, but using the more flexible approach provided by Qt's model/view architecture.

QTreeView implements the interfaces defined by the QAbstractItemView class to allow it to display data provided by models derived from the QAbstractItemModel class.


QTreeWidget

Ref: C++ - PySide

windows-treeview

The QTreeWidget class provides a tree view that uses a predefined tree model.

The QTreeWidget class is a convenience class that provides a standard tree widget with a classic item-based interface similar to that used by the QListView class in Qt 3. This class is based on Qt's Model/View architecture and uses a default model to hold items, each of which is a QTreeWidgetItem.