Widgets Classes#

The primary elements for designing user interfaces in Qt.

The Widget Classes#

The following sections list the widget classes. See the Qt Widget Gallery for some examples.

Basic Widget Classes#

These basic widgets (controls), e.g. buttons, comboboxes and scroll bars, are designed for direct use.

../_images/fusion-label.png ../_images/windowsvista-pushbutton.png ../_images/macos-progressbar.png
../_images/fusion-combobox.png ../_images/windowsvista-radiobutton.png ../_images/macos-lineedit.png

PySide6.QtWidgets.QWidget

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

PySide6.QtWidgets.QCheckBox

The QCheckBox widget provides a checkbox with a text label.

PySide6.QtWidgets.QComboBox

The QComboBox widget combines a button with a dropdown list.

PySide6.QtWidgets.QCommandLinkButton

The QCommandLinkButton widget provides a Vista style command link button.

PySide6.QtWidgets.QDateTimeEdit

The QDateTimeEdit class provides a widget for editing dates and times.

PySide6.QtWidgets.QTimeEdit

The QTimeEdit class provides a widget for editing times based on the QDateTimeEdit widget.

PySide6.QtWidgets.QDateEdit

The QDateEdit class provides a widget for editing dates based on the QDateTimeEdit widget.

PySide6.QtWidgets.QDial

The QDial class provides a rounded range control (like a speedometer or potentiometer).

PySide6.QtWidgets.QFocusFrame

The QFocusFrame widget provides a focus frame which can be outside of a widget’s normal paintable area.

PySide6.QtWidgets.QFontComboBox

The QFontComboBox widget is a combobox that lets the user select a font family.

PySide6.QtWidgets.QLabel

The QLabel widget provides a text or image display.

PySide6.QtWidgets.QLCDNumber

The QLCDNumber widget displays a number with LCD-like digits.

PySide6.QtWidgets.QLineEdit

The QLineEdit widget is a one-line text editor.

PySide6.QtWidgets.QMenu

The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus.

PySide6.QtWidgets.QProgressBar

The QProgressBar widget provides a horizontal or vertical progress bar.

PySide6.QtWidgets.QPushButton

The QPushButton widget provides a command button.

PySide6.QtWidgets.QRadioButton

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

PySide6.QtWidgets.QScrollArea

The QScrollArea class provides a scrolling view onto another widget.

PySide6.QtWidgets.QScrollBar

The QScrollBar widget provides a vertical or horizontal scroll bar.

PySide6.QtWidgets.QSizeGrip

The QSizeGrip class provides a resize handle for resizing top-level windows.

PySide6.QtWidgets.QSlider

The QSlider widget provides a vertical or horizontal slider.

PySide6.QtWidgets.QSpinBox

The QSpinBox class provides a spin box widget.

PySide6.QtWidgets.QDoubleSpinBox

The QDoubleSpinBox class provides a spin box widget that takes doubles.

PySide6.QtWidgets.QTabBar

The QTabBar class provides a tab bar, e.g. for use in tabbed dialogs.

PySide6.QtWidgets.QTabWidget

The QTabWidget class provides a stack of tabbed widgets.

PySide6.QtWidgets.QToolBox

The QToolBox class provides a column of tabbed widget items.

PySide6.QtWidgets.QToolButton

The QToolButton class provides a quick-access button to commands or options, usually used inside a QToolBar.

Advanced Widget Classes#

Advanced GUI widgets, e.g. tab widgets and progress bars, provide more complex user interface controls.

../_images/windows-treeview1.png ../_images/fusion-calendarwidget1.png ../_images/qundoview1.png

PySide6.QtWidgets.QColumnView

The QColumnView class provides a model/view implementation of a column view.

PySide6.QtWidgets.QDataWidgetMapper

The QDataWidgetMapper class provides mapping between a section of a data model to widgets.

PySide6.QtWidgets.QListView

The QListView class provides a list or icon view onto a model.

PySide6.QtWidgets.QTableView

The QTableView class provides a default model/view implementation of a table view.

PySide6.QtWidgets.QTreeView

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

PySide6.QtWidgets.QUndoView

The QUndoView class displays the contents of a QUndoStack.

PySide6.QtWidgets.QCalendarWidget

The QCalendarWidget class provides a monthly based calendar widget allowing the user to select a date.

Abstract Widget Classes#

The abstract widget classes are base classes. They are not usable as standalone classes but provide functionality when they are subclassed.

PySide6.QtWidgets.QDialog

The QDialog class is the base class of dialog windows.

PySide6.QtWidgets.QAbstractButton

The QAbstractButton class is the abstract base class of button widgets, providing functionality common to buttons.

PySide6.QtWidgets.QAbstractScrollArea

The QAbstractScrollArea widget provides a scrolling area with on-demand scroll bars.

PySide6.QtWidgets.QAbstractSlider

The QAbstractSlider class provides an integer value within a range.

PySide6.QtWidgets.QAbstractSpinBox

The QAbstractSpinBox class provides a spinbox and a line edit to display values.

PySide6.QtWidgets.QFrame

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

Organizer Widget Classes#

Classes like splitters, tab bars, button groups, etc are used for organizing and grouping GUI primitives into more complex applications and dialogs.

PySide6.QtWidgets.QButtonGroup

The QButtonGroup class provides a container to organize groups of button widgets.

PySide6.QtWidgets.QGroupBox

The QGroupBox widget provides a group box frame with a title.

PySide6.QtWidgets.QSplitterHandle

The QSplitterHandle class provides handle functionality for the splitter.

PySide6.QtWidgets.QSplitter

The QSplitter class implements a splitter widget.

PySide6.QtWidgets.QStackedWidget

The QStackedWidget class provides a stack of widgets where only one widget is visible at a time.

PySide6.QtWidgets.QTabWidget

The QTabWidget class provides a stack of tabbed widgets.

Graphics View Classes#

PySide6.QtWidgets.QGraphicsEffect

The QGraphicsEffect class is the base class for all graphics effects.

PySide6.QtWidgets.QGraphicsAnchorLayout

The QGraphicsAnchorLayout class provides a layout where one can anchor widgets together in Graphics View.

PySide6.QtWidgets.QGraphicsAnchor

The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout.

PySide6.QtWidgets.QGraphicsGridLayout

The QGraphicsGridLayout class provides a grid layout for managing widgets in Graphics View.

PySide6.QtWidgets.QGraphicsItem

The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.

PySide6.QtWidgets.QGraphicsObject

The QGraphicsObject class provides a base class for all graphics items that require signals, slots and properties.

PySide6.QtWidgets.QAbstractGraphicsShapeItem

The QAbstractGraphicsShapeItem class provides a common base for all path items.

PySide6.QtWidgets.QGraphicsPathItem

The QGraphicsPathItem class provides a path item that you can add to a QGraphicsScene.

PySide6.QtWidgets.QGraphicsRectItem

The QGraphicsRectItem class provides a rectangle item that you can add to a QGraphicsScene.

PySide6.QtWidgets.QGraphicsEllipseItem

The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene.

PySide6.QtWidgets.QGraphicsPolygonItem

The QGraphicsPolygonItem class provides a polygon item that you can add to a QGraphicsScene.

PySide6.QtWidgets.QGraphicsLineItem

The QGraphicsLineItem class provides a line item that you can add to a QGraphicsScene.

PySide6.QtWidgets.QGraphicsPixmapItem

The QGraphicsPixmapItem class provides a pixmap item that you can add to a QGraphicsScene.

PySide6.QtWidgets.QGraphicsTextItem

The QGraphicsTextItem class provides a text item that you can add to a QGraphicsScene to display formatted text.

PySide6.QtWidgets.QGraphicsSimpleTextItem

The QGraphicsSimpleTextItem class provides a simple text path item that you can add to a QGraphicsScene.

PySide6.QtWidgets.QGraphicsItemGroup

The QGraphicsItemGroup class provides a container that treats a group of items as a single item.

PySide6.QtWidgets.QGraphicsItemAnimation

The QGraphicsItemAnimation class provides simple animation support for QGraphicsItem.

PySide6.QtWidgets.QGraphicsLayout

The QGraphicsLayout class provides the base class for all layouts in Graphics View.

PySide6.QtWidgets.QGraphicsLayoutItem

The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts.

PySide6.QtWidgets.QGraphicsLinearLayout

The QGraphicsLinearLayout class provides a horizontal or vertical layout for managing widgets in Graphics View.

PySide6.QtWidgets.QGraphicsProxyWidget

The QGraphicsProxyWidget class provides a proxy layer for embedding a QWidget in a QGraphicsScene.

PySide6.QtWidgets.QGraphicsScene

The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.

The QGraphicsSceneBspTreeIndex class provides an implementation of a BSP indexing algorithm for discovering items in QGraphicsScene.

PySide6.QtWidgets.QGraphicsSceneEvent

The QGraphicsSceneEvent class provides a base class for all graphics view related events.

PySide6.QtWidgets.QGraphicsSceneMouseEvent

The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.

PySide6.QtWidgets.QGraphicsSceneWheelEvent

The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.

PySide6.QtWidgets.QGraphicsSceneContextMenuEvent

The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.

PySide6.QtWidgets.QGraphicsSceneHoverEvent

The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.

PySide6.QtWidgets.QGraphicsSceneHelpEvent

The QGraphicsSceneHelpEvent class provides events when a tooltip is requested.

PySide6.QtWidgets.QGraphicsSceneDragDropEvent

The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framework.

PySide6.QtWidgets.QGraphicsSceneResizeEvent

The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framework.

PySide6.QtWidgets.QGraphicsSceneMoveEvent

The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.

The QGraphicsSceneIndex class provides a base class to implement a custom indexing algorithm for discovering items in QGraphicsScene.

The QGraphicsSceneLinearIndex class provides an implementation of a linear indexing algorithm for discovering items in QGraphicsScene.

PySide6.QtWidgets.QGraphicsTransform

The QGraphicsTransform class is an abstract base class for building advanced transformations on QGraphicsItems.

PySide6.QtWidgets.QGraphicsView

The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.

PySide6.QtWidgets.QGraphicsWidget

The QGraphicsWidget class is the base class for all widget items in a QGraphicsScene.

PySide6.QtWidgets.QStyleOptionGraphicsItem

The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.

Model/View Classes#

PySide6.QtWidgets.QAbstractItemDelegate

The QAbstractItemDelegate class is used to display and edit data items from a model.

PySide6.QtWidgets.QAbstractItemView

The QAbstractItemView class provides the basic functionality for item view classes.

PySide6.QtWidgets.QColumnView

The QColumnView class provides a model/view implementation of a column view.

PySide6.QtWidgets.QDataWidgetMapper

The QDataWidgetMapper class provides mapping between a section of a data model to widgets.

PySide6.QtWidgets.QHeaderView

The QHeaderView class provides a header row or header column for item views.

PySide6.QtWidgets.QItemDelegate

The QItemDelegate class provides display and editing facilities for data items from a model.

PySide6.QtWidgets.QItemEditorFactory

The QItemEditorFactory class provides widgets for editing item data in views and delegates.

PySide6.QtWidgets.QItemEditorCreatorBase

The QItemEditorCreatorBase class provides an abstract base class that must be subclassed when implementing new item editor creators.

QItemEditorCreator

The QItemEditorCreator class makes it possible to create item editor creator bases without subclassing QItemEditorCreatorBase.

QStandardItemEditorCreator

The QStandardItemEditorCreator class provides the possibility to register widgets without having to subclass QItemEditorCreatorBase.

PySide6.QtWidgets.QListView

The QListView class provides a list or icon view onto a model.

PySide6.QtWidgets.QListWidgetItem

The QListWidgetItem class provides an item for use with the QListWidget item view class.

PySide6.QtWidgets.QListWidget

The QListWidget class provides an item-based list widget.

PySide6.QtWidgets.QStyledItemDelegate

The QStyledItemDelegate class provides display and editing facilities for data items from a model.

PySide6.QtWidgets.QTableView

The QTableView class provides a default model/view implementation of a table view.

PySide6.QtWidgets.QTableWidgetSelectionRange

The QTableWidgetSelectionRange class provides a way to interact with selection in a model without using model indexes and a selection model.

PySide6.QtWidgets.QTableWidgetItem

The QTableWidgetItem class provides an item for use with the QTableWidget class.

PySide6.QtWidgets.QTableWidget

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

PySide6.QtWidgets.QTreeView

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

PySide6.QtWidgets.QTreeWidgetItem

The QTreeWidgetItem class provides an item for use with the QTreeWidget convenience class.

PySide6.QtWidgets.QTreeWidget

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

PySide6.QtWidgets.QTreeWidgetItemIterator

The QTreeWidgetItemIterator class provides a way to iterate over the items in a QTreeWidget instance.

Layout Classes#

PySide6.QtWidgets.QGraphicsAnchorLayout

The QGraphicsAnchorLayout class provides a layout where one can anchor widgets together in Graphics View.

PySide6.QtWidgets.QGraphicsAnchor

The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout.

PySide6.QtWidgets.QBoxLayout

The QBoxLayout class lines up child widgets horizontally or vertically.

PySide6.QtWidgets.QHBoxLayout

The QHBoxLayout class lines up widgets horizontally.

PySide6.QtWidgets.QVBoxLayout

The QVBoxLayout class lines up widgets vertically.

PySide6.QtWidgets.QFormLayout

The QFormLayout class manages forms of input widgets and their associated labels.

PySide6.QtWidgets.QGridLayout

The QGridLayout class lays out widgets in a grid.

PySide6.QtWidgets.QLayout

The QLayout class is the base class of geometry managers.

PySide6.QtWidgets.QLayoutItem

The QLayoutItem class provides an abstract item that a QLayout manipulates.

PySide6.QtWidgets.QSpacerItem

The QSpacerItem class provides blank space in a layout.

PySide6.QtWidgets.QWidgetItem

The QWidgetItem class is a layout item that represents a widget.

PySide6.QtWidgets.QSizePolicy

The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.

PySide6.QtWidgets.QStackedLayout

The QStackedLayout class provides a stack of widgets where only one widget is visible at a time.

PySide6.QtWidgets.QButtonGroup

The QButtonGroup class provides a container to organize groups of button widgets.

PySide6.QtWidgets.QGroupBox

The QGroupBox widget provides a group box frame with a title.

PySide6.QtWidgets.QStackedWidget

The QStackedWidget class provides a stack of widgets where only one widget is visible at a time.