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.
The QWidget class is the base class of all user interface objects.
The QCheckBox widget provides a checkbox with a text label.
The QComboBox widget combines a button with a dropdown list.
The QCommandLinkButton widget provides a Vista style command link button.
The QDateTimeEdit class provides a widget for editing dates and times.
The QTimeEdit class provides a widget for editing times based on the QDateTimeEdit widget.
The QDateEdit class provides a widget for editing dates based on the QDateTimeEdit widget.
The QDial class provides a rounded range control (like a speedometer or potentiometer).
The QFocusFrame widget provides a focus frame which can be outside of a widget’s normal paintable area.
The QFontComboBox widget is a combobox that lets the user select a font family.
The QLabel widget provides a text or image display.
The QLCDNumber widget displays a number with LCD-like digits.
The QLineEdit widget is a one-line text editor.
The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus.
The QProgressBar widget provides a horizontal or vertical progress bar.
The QPushButton widget provides a command button.
The QRadioButton widget provides a radio button with a text label.
The QScrollArea class provides a scrolling view onto another widget.
The QScrollBar widget provides a vertical or horizontal scroll bar.
The QSizeGrip class provides a resize handle for resizing top-level windows.
The QSlider widget provides a vertical or horizontal slider.
The QSpinBox class provides a spin box widget.
The QDoubleSpinBox class provides a spin box widget that takes doubles.
The QTabBar class provides a tab bar, e.g. for use in tabbed dialogs.
The QTabWidget class provides a stack of tabbed widgets.
The QToolBox class provides a column of tabbed widget items.
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.
The QColumnView class provides a model/view implementation of a column view.
The QDataWidgetMapper class provides mapping between a section of a data model to widgets.
The QListView class provides a list or icon view onto a model.
The QTableView class provides a default model/view implementation of a table view.
The QTreeView class provides a default model/view implementation of a tree view.
The QUndoView class displays the contents of a QUndoStack.
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.
The QDialog class is the base class of dialog windows.
The QAbstractButton class is the abstract base class of button widgets, providing functionality common to buttons.
The QAbstractScrollArea widget provides a scrolling area with on-demand scroll bars.
The QAbstractSlider class provides an integer value within a range.
The QAbstractSpinBox class provides a spinbox and a line edit to display values.
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.
The QButtonGroup class provides a container to organize groups of button widgets.
The QGroupBox widget provides a group box frame with a title.
The QSplitterHandle class provides handle functionality for the splitter.
The QSplitter class implements a splitter widget.
The QStackedWidget class provides a stack of widgets where only one widget is visible at a time.
The QTabWidget class provides a stack of tabbed widgets.
Graphics View Classes#
The QGraphicsEffect class is the base class for all graphics effects.
The QGraphicsAnchorLayout class provides a layout where one can anchor widgets together in Graphics View.
The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout.
The QGraphicsGridLayout class provides a grid layout for managing widgets in Graphics View.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsObject class provides a base class for all graphics items that require signals, slots and properties.
The QAbstractGraphicsShapeItem class provides a common base for all path items.
The QGraphicsPathItem class provides a path item that you can add to a QGraphicsScene.
The QGraphicsRectItem class provides a rectangle item that you can add to a QGraphicsScene.
The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene.
The QGraphicsPolygonItem class provides a polygon item that you can add to a QGraphicsScene.
The QGraphicsLineItem class provides a line item that you can add to a QGraphicsScene.
The QGraphicsPixmapItem class provides a pixmap item that you can add to a QGraphicsScene.
The QGraphicsTextItem class provides a text item that you can add to a QGraphicsScene to display formatted text.
The QGraphicsSimpleTextItem class provides a simple text path item that you can add to a QGraphicsScene.
The QGraphicsItemGroup class provides a container that treats a group of items as a single item.
The QGraphicsItemAnimation class provides simple animation support for QGraphicsItem.
The QGraphicsLayout class provides the base class for all layouts in Graphics View.
The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts.
The QGraphicsLinearLayout class provides a horizontal or vertical layout for managing widgets in Graphics View.
The QGraphicsProxyWidget class provides a proxy layer for embedding a QWidget in a 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.
The QGraphicsSceneEvent class provides a base class for all graphics view related events.
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.
The QGraphicsSceneContextMenuEvent class provides context menu events in the graphics view framework.
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.
The QGraphicsSceneHelpEvent class provides events when a tooltip is requested.
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framework.
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framework.
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.
The QGraphicsTransform class is an abstract base class for building advanced transformations on QGraphicsItems.
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
The QGraphicsWidget class is the base class for all widget items in a QGraphicsScene.
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem.
Model/View Classes#
The QAbstractItemDelegate class is used to display and edit data items from a model.
The QAbstractItemView class provides the basic functionality for item view classes.
The QColumnView class provides a model/view implementation of a column view.
The QDataWidgetMapper class provides mapping between a section of a data model to widgets.
The QHeaderView class provides a header row or header column for item views.
The QItemDelegate class provides display and editing facilities for data items from a model.
The QItemEditorFactory class provides widgets for editing item data in views and delegates.
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.
The QListView class provides a list or icon view onto a model.
The QListWidgetItem class provides an item for use with the QListWidget item view class.
The QListWidget class provides an item-based list widget.
The QStyledItemDelegate class provides display and editing facilities for data items from a model.
The QTableView class provides a default model/view implementation of a table view.
The QTableWidgetSelectionRange class provides a way to interact with selection in a model without using model indexes and a selection model.
The QTableWidgetItem class provides an item for use with the QTableWidget class.
The QTableWidget class provides an item-based table view with a default model.
The QTreeView class provides a default model/view implementation of a tree view.
The QTreeWidgetItem class provides an item for use with the QTreeWidget convenience class.
The QTreeWidget class provides a tree view that uses a predefined tree model.
The QTreeWidgetItemIterator class provides a way to iterate over the items in a QTreeWidget instance.
Layout Classes#
The QGraphicsAnchorLayout class provides a layout where one can anchor widgets together in Graphics View.
The QGraphicsAnchor class represents an anchor between two items in a QGraphicsAnchorLayout.
The QBoxLayout class lines up child widgets horizontally or vertically.
The QHBoxLayout class lines up widgets horizontally.
The QVBoxLayout class lines up widgets vertically.
The QFormLayout class manages forms of input widgets and their associated labels.
The QGridLayout class lays out widgets in a grid.
The QLayout class is the base class of geometry managers.
The QLayoutItem class provides an abstract item that a QLayout manipulates.
The QSpacerItem class provides blank space in a layout.
The QWidgetItem class is a layout item that represents a widget.
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
The QStackedLayout class provides a stack of widgets where only one widget is visible at a time.
The QButtonGroup class provides a container to organize groups of button widgets.
The QGroupBox widget provides a group box frame with a title.
The QStackedWidget class provides a stack of widgets where only one widget is visible at a time.