Widgets Classes | Qt Widgets 5.6

Qt 5.6 | Qt Widgets | Widgets Classes

Qt 5.6.2 Reference Documentation

# Widgets Classes

## 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.

QWidget | The base class of all user interface objects
QCheckBox | Checkbox with a text label
QComboBox | Combined button and popup list
QCommandLinkButton | Vista style command link button
QDateEdit | Widget for editing dates based on the QDateTimeEdit widget
QDateTimeEdit | Widget for editing dates and times
QTimeEdit | Widget for editing times based on the QDateTimeEdit widget
QDial | Rounded range control (like a speedometer or potentiometer)
QFocusFrame | Focus frame which can be outside of a widget's normal paintable area
QFontComboBox | Combobox that lets the user select a font family
QLabel | Text or image display
QLCDNumber | Displays a number with LCD-like digits
QLineEdit | One-line text editor
QMenu | Menu widget for use in menu bars, context menus, and other popup menus
QProgressBar | Horizontal or vertical progress bar
QPushButton | Command button
QRadioButton | Radio button with a text label
QScrollArea | Scrolling view onto another widget
QScrollBar | Vertical or horizontal scroll bar
QSizeGrip | Resize handle for resizing top-level windows
QSlider | Vertical or horizontal slider
QDoubleSpinBox | Spin box widget that takes doubles
QSpinBox | Spin box widget
QTabBar | Tab bar, e.g. for use in tabbed dialogs
QTabWidget | Stack of tabbed widgets
QToolBox | Column of tabbed widget items
QToolButton | 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.

QColumnView | Model/view implementation of a column view
QDataWidgetMapper | Mapping between a section of a data model to widgets
QListView | List or icon view onto a model
QTableView | Default model/view implementation of a table view
QTreeView | Default model/view implementation of a tree view
QDesktopWidget | Access to screen information on multi-head systems
QUndoView | Displays the contents of a QUndoStack
QCalendarWidget | Monthly based calendar widget allowing the user to select a date
QMacCocoaViewContainer | Widget for macOS that can be used to wrap arbitrary Cocoa views (i.e., NSView subclasses) and insert them into Qt hierarchies
QMacNativeWidget | Widget for macOS that provides a way to put Qt widgets into Cocoa hierarchies

### Abstract Widget Classes

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

QDialog | The base class of dialog windows
QAbstractButton | The abstract base class of button widgets, providing functionality common to buttons
QAbstractScrollArea | Scrolling area with on-demand scroll bars
QAbstractSlider | Integer value within a range
QAbstractSpinBox | Spinbox and a line edit to display values
QFrame | 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.

QButtonGroup | Container to organize groups of button widgets
QGroupBox | Group box frame with a title
QSplitter | Implements a splitter widget
QSplitterHandle | Handle functionality for the splitter
QStackedWidget | Stack of widgets where only one widget is visible at a time
QTabWidget | Stack of tabbed widgets

### Graphics View Classes

QGraphicsEffect | The base class for all graphics effects
QGraphicsAnchor | Represents an anchor between two items in a QGraphicsAnchorLayout
QGraphicsAnchorLayout | Layout where one can anchor widgets together in Graphics View
QGraphicsGridLayout | Grid layout for managing widgets in Graphics View
QAbstractGraphicsShapeItem | Common base for all path items
QGraphicsEllipseItem | Ellipse item that you can add to a QGraphicsScene
QGraphicsItem | The base class for all graphical items in a QGraphicsScene
QGraphicsItemGroup | Container that treats a group of items as a single item
QGraphicsLineItem | Line item that you can add to a QGraphicsScene
QGraphicsObject | Base class for all graphics items that require signals, slots and properties
QGraphicsPathItem | Path item that you can add to a QGraphicsScene
QGraphicsPixmapItem | Pixmap item that you can add to a QGraphicsScene
QGraphicsPolygonItem | Polygon item that you can add to a QGraphicsScene
QGraphicsRectItem | Rectangle item that you can add to a QGraphicsScene
QGraphicsSimpleTextItem | Simple text path item that you can add to a QGraphicsScene
QGraphicsTextItem | Text item that you can add to a QGraphicsScene to display formatted text
QGraphicsLayout | The base class for all layouts in Graphics View
QGraphicsLayoutItem | Can be inherited to allow your custom items to be managed by layouts
QGraphicsLinearLayout | Horizontal or vertical layout for managing widgets in Graphics View
QGraphicsProxyWidget | Proxy layer for embedding a QWidget in a QGraphicsScene
QGraphicsScene | Surface for managing a large number of 2D graphical items
QGraphicsSceneContextMenuEvent | Context menu events in the graphics view framework
QGraphicsSceneDragDropEvent | Events for drag and drop in the graphics view framework
QGraphicsSceneEvent | Base class for all graphics view related events
QGraphicsSceneHelpEvent | Events when a tooltip is requested
QGraphicsSceneHoverEvent | Hover events in the graphics view framework
QGraphicsSceneMouseEvent | Mouse events in the graphics view framework
QGraphicsSceneMoveEvent | Events for widget moving in the graphics view framework
QGraphicsSceneResizeEvent | Events for widget resizing in the graphics view framework
QGraphicsSceneWheelEvent | Wheel events in the graphics view framework
QGraphicsTransform | Abstract base class for building advanced transformations on QGraphicsItems
QGraphicsView | Widget for displaying the contents of a QGraphicsScene
QGraphicsWidget | The base class for all widget items in a QGraphicsScene
QStyleOptionGraphicsItem | Used to describe the parameters needed to draw a QGraphicsItem

### Model/View Classes

QFileSystemModel | Data model for the local filesystem
QAbstractItemDelegate | Used to display and edit data items from a model
QAbstractItemView | The basic functionality for item view classes
QColumnView | Model/view implementation of a column view
QDataWidgetMapper | Mapping between a section of a data model to widgets
QHeaderView | Header row or header column for item views
QItemDelegate | Display and editing facilities for data items from a model
QItemEditorCreator | Makes it possible to create item editor creator bases without subclassing QItemEditorCreatorBase
QItemEditorCreatorBase | Abstract base class that must be subclassed when implementing new item editor creators
QItemEditorFactory | Widgets for editing item data in views and delegates
QStandardItemEditorCreator | The possibility to register widgets without having to subclass QItemEditorCreatorBase
QListView | List or icon view onto a model
QListWidget | Item-based list widget
QListWidgetItem | Item for use with the QListWidget item view class
QStyledItemDelegate | Display and editing facilities for data items from a model
QTableView | Default model/view implementation of a table view
QTableWidget | Item-based table view with a default model
QTableWidgetItem | Item for use with the QTableWidget class
QTableWidgetSelectionRange | Way to interact with selection in a model without using model indexes and a selection model
QTreeView | Default model/view implementation of a tree view
QTreeWidget | Tree view that uses a predefined tree model
QTreeWidgetItem | Item for use with the QTreeWidget convenience class
QTreeWidgetItemIterator | Way to iterate over the items in a QTreeWidget instance

### Main Window and Related Classes

QAction | Abstract user interface action that can be inserted into widgets
QActionGroup | Groups actions together
QWidgetAction | Extends QAction by an interface for inserting custom widgets into action based containers, such as toolbars
QDockWidget | Widget that can be docked inside a QMainWindow or floated as a top-level window on the desktop
QMainWindow | Main application window
QMdiArea | Area in which MDI windows are displayed
QMdiSubWindow | Subwindow class for QMdiArea
QMenu | Menu widget for use in menu bars, context menus, and other popup menus
QMenuBar | Horizontal menu bar
QSizeGrip | Resize handle for resizing top-level windows
QStatusBar | Horizontal bar suitable for presenting status information
QToolBar | Movable panel that contains a set of controls

### Widget Appearance and Style-Related Classes

Classes used for customizing UI appearance and style.

QGraphicsAnchor | Represents an anchor between two items in a QGraphicsAnchorLayout
QGraphicsAnchorLayout | Layout where one can anchor widgets together in Graphics View
QCommonStyle | Encapsulates the common Look and Feel of a GUI
QStyle | Abstract base class that encapsulates the look and feel of a GUI
QStyleFactory | Creates QStyle objects
QStyleHintReturn | Style hints that return more than basic data types
QStyleHintReturnMask | Style hints that return a QRegion
QStyleHintReturnVariant | Style hints that return a QVariant
QStyleOption | Stores the parameters used by QStyle functions
QStylePainter | Convenience class for drawing QStyle elements inside a widget

### Layout Classes

QGraphicsAnchor | Represents an anchor between two items in a QGraphicsAnchorLayout
QGraphicsAnchorLayout | Layout where one can anchor widgets together in Graphics View
QBoxLayout | Lines up child widgets horizontally or vertically
QHBoxLayout | Lines up widgets horizontally
QVBoxLayout | Lines up widgets vertically
QFormLayout | Manages forms of input widgets and their associated labels
QGridLayout | Lays out widgets in a grid
QLayout | The base class of geometry managers
QLayoutItem | Abstract item that a QLayout manipulates
QSpacerItem | Blank space in a layout
QWidgetItem | Layout item that represents a widget
QSizePolicy | Layout attribute describing horizontal and vertical resizing policy
QStackedLayout | Stack of widgets where only one widget is visible at a time
QButtonGroup | Container to organize groups of button widgets
QGroupBox | Group box frame with a title
QStackedWidget | Stack of widgets where only one widget is visible at a time