Qt 5.6 | Qt GUI | Qt GUI C++ Classes

Qt 5.6.2 Reference Documentation

# Qt GUI C++ Classes

The Qt GUI module provides the basic enablers for graphical applications written with Qt. More...

## Classes

QAccessible | Enums and static functions related to accessibility
QAccessibleEditableTextInterface | Implements support for objects with editable text
QAccessibleEvent | The base class for accessibility notifications
QAccessibleImageInterface | Implements support for the IAccessibleImage interface
QAccessibleInterface | Defines an interface that exposes information about accessible objects
QAccessibleStateChangeEvent | Notfies the accessibility framework that the state of an object has changed
QAccessibleTableCellInterface | Implements support for the IAccessibleTable2 Cell interface
QAccessibleTableModelChangeEvent | Signifies a change in a table, list, or tree where cells are added or removed. If the change affected a number of rows, firstColumn and lastColumn will return -1. Likewise for columns, the row functions may return -1
QAccessibleTextCursorEvent | Notifies of cursor movements
QAccessibleTextInsertEvent | Notifies of text being inserted
QAccessibleTextInterface | Implements support for text handling
QAccessibleTextRemoveEvent | Notifies of text being deleted
QAccessibleTextSelectionEvent | Signals a change in the text selection of an object
QAccessibleTextUpdateEvent | Notifies about text changes. This is for accessibles that support editable text such as line edits. This event occurs for example when a portion of selected text gets replaced by pasting a new text or in override mode of editors
QAccessibleValueChangeEvent | Describes a change in value for an accessible object
QAccessibleValueInterface | Implements support for objects that manipulate a value
QAccessible::State
QAccessibleObject | Implements parts of the QAccessibleInterface for QObjects
QBitmap | Monochrome (1-bit depth) pixmaps
QIcon | Scalable icons in different modes and states
QIconEngine::AvailableSizesArgument
QIconEngine | Abstract base class for QIcon renderers
QIconEnginePlugin | Abstract base for custom QIconEngine plugins
QImage | Hardware-independent image representation that allows direct access to the pixel data, and can be used as a paint device
QImageIOHandler | Defines the common image I/O interface for all image formats in Qt
QImageIOPlugin | Defines an interface for writing an image format plugin
QImageReader | Format independent interface for reading images from files or other devices
QImageWriter | Format independent interface for writing images to files or other devices
QMovie | Convenience class for playing movies with QImageReader
QPicture | Paint device that records and replays QPainter commands
QPixmap | Off-screen image representation that can be used as a paint device
QPixmapCache::Key | QPixmapCache::Key class can be used for efficient access to the QPixmapCache
QPixmapCache | Application-wide cache for pixmaps
QStandardItem | Item for use with the QStandardItemModel class
QStandardItemModel | Generic model for storing custom data
QClipboard | Access to the window system clipboard
QCursor | Mouse cursor with an arbitrary shape
QDrag | Support for MIME-based drag and drop data transfer
QInputMethodEvent::Attribute | QInputMethodEvent::Attribute class stores an input method attribute
QActionEvent | Event that is generated when a QAction is added, removed, or changed
QCloseEvent | Contains parameters that describe a close event
QContextMenuEvent | Contains parameters that describe a context menu event
QDragEnterEvent | Event which is sent to a widget when a drag and drop action enters it
QDragLeaveEvent | Event that is sent to a widget when a drag and drop action leaves it
QDragMoveEvent | Event which is sent while a drag and drop action is in progress
QDropEvent | Event which is sent when a drag and drop action is completed
QEnterEvent | Contains parameters that describe an enter event
QExposeEvent | Contains event parameters for expose events
QFileOpenEvent | Event that will be sent when there is a request to open a file or a URL
QFocusEvent | Contains event parameters for widget focus events
QHelpEvent | Event that is used to request helpful information about a particular point in a widget
QHideEvent | Event which is sent after a widget is hidden
QHoverEvent | Contains parameters that describe a mouse event
QIconDragEvent | Indicates that a main icon drag has begun
QInputEvent | The base class for events that describe user input
QInputMethodEvent | Parameters for input method events
QInputMethodQueryEvent | Event sent by the input context to input objects
QKeyEvent | Describes a key event
QMouseEvent | Contains parameters that describe a mouse event
QMoveEvent | Contains event parameters for move events
QNativeGestureEvent | Contains parameters that describe a gesture event
QPaintEvent | Contains event parameters for paint events
QPlatformSurfaceEvent | Used to notify about native platform surface events
QResizeEvent | Contains event parameters for resize events
QScrollEvent | Sent when scrolling
QScrollPrepareEvent | Sent in preparation of scrolling
QShortcutEvent | Event which is generated when the user presses a key combination
QShowEvent | Event that is sent when a widget is shown
QStatusTipEvent | Event that is used to show messages in a status bar
QTabletEvent | Contains parameters that describe a Tablet event
QTouchEvent | Contains parameters that describe a touch event
QWhatsThisClickedEvent | Event that can be used to handle hyperlinks in a "What's This?" text
QWheelEvent | Contains parameters that describe a wheel event
QWindowStateChangeEvent | The window state before a window state change
QTouchEvent::TouchPoint | Information about a touch point in a QTouchEvent
QGenericPlugin | Abstract base class for plugins
QGenericPluginFactory | Creates plugin drivers
QGuiApplication | Manages the GUI application's control flow and main settings
QInputMethod | Access to the active text input method
QKeySequence | Encapsulates a key sequence as used by shortcuts
QOffscreenSurface | Represents an offscreen surface in the underlying platform
QOpenGLContext | Represents a native OpenGL context, enabling OpenGL rendering on a QSurface
QOpenGLContextGroup | Represents a group of contexts sharing OpenGL resources
QOpenGLVersionProfile | Represents the version and if applicable the profile of an OpenGL context
QOpenGLWindow | Convenience subclass of QWindow to perform OpenGL painting
QPaintDeviceWindow | Convenience subclass of QWindow that is also a QPaintDevice
QPalette | Contains color groups for each widget state
QPixelFormat | Class for describing different pixel layouts in graphics buffers
QPlatformGraphicsBuffer | Windowsystem abstraction for native graphics buffers
QPlatformSystemTrayIcon | Abstracts the system tray icon and interaction
QRasterWindow | Convenience class for using QPainter on a QWindow
QScreen | Used to query screen properties
QSessionManager | Access to the session manager
QStyleHints | Contains platform specific hints and settings
QSurface | Abstraction of renderable surfaces in Qt
QSurfaceFormat | Represents the format of a QSurface
QTouchDevice | Describes the device from which touch events originate
QWindow | Represents a window in the underlying windowing system
QGenericMatrix | Template class that represents a NxM transformation matrix with N columns and M rows
QMatrix4x4 | Represents a 4x4 transformation matrix in 3D space
QQuaternion | Represents a quaternion consisting of a vector and scalar
QVector2D | Represents a vector or vertex in 2D space
QVector3D | Represents a vector or vertex in 3D space
QVector4D | Represents a vector or vertex in 4D space
QOpenGLBuffer | Functions for creating and managing OpenGL buffer objects
QOpenGLDebugLogger | Enables logging of OpenGL debugging messages
QOpenGLDebugMessage | Wraps an OpenGL debug message
QOpenGLExtraFunctions | Cross-platform access to the OpenGL ES 3.0 and 3.1 API
QOpenGLFramebufferObject | Encapsulates an OpenGL framebuffer object
QOpenGLFramebufferObjectFormat | Specifies the format of an OpenGL framebuffer object
QOpenGLFunctions | Cross-platform access to the OpenGL ES 2.0 API
QOpenGLFunctions_1_0 | All functions for OpenGL 1.0 specification
QOpenGLFunctions_1_1 | All functions for OpenGL 1.1 specification
QOpenGLFunctions_1_2 | All functions for OpenGL 1.2 specification
QOpenGLFunctions_1_3 | All functions for OpenGL 1.3 specification
QOpenGLFunctions_1_4 | All functions for OpenGL 1.4 specification
QOpenGLFunctions_1_5 | All functions for OpenGL 1.5 specification
QOpenGLFunctions_2_0 | All functions for OpenGL 2.0 specification
QOpenGLFunctions_2_1 | All functions for OpenGL 2.1 specification
QOpenGLFunctions_3_0 | All functions for OpenGL 3.0 specification
QOpenGLFunctions_3_1 | All functions for OpenGL 3.1 specification
QOpenGLFunctions_3_2_Compatibility | All functions for OpenGL 3.2 compatibility profile
QOpenGLFunctions_3_2_Core | All functions for OpenGL 3.2 core profile
QOpenGLFunctions_3_3_Compatibility | All functions for OpenGL 3.3 compatibility profile
QOpenGLFunctions_3_3_Core | All functions for OpenGL 3.3 core profile
QOpenGLFunctions_4_0_Compatibility | All functions for OpenGL 4.0 compatibility profile
QOpenGLFunctions_4_0_Core | All functions for OpenGL 4.0 core profile
QOpenGLFunctions_4_1_Compatibility | All functions for OpenGL 4.1 compatibility profile
QOpenGLFunctions_4_1_Core | All functions for OpenGL 4.1 core profile
QOpenGLFunctions_4_2_Compatibility | All functions for OpenGL 4.2 compatibility profile
QOpenGLFunctions_4_2_Core | All functions for OpenGL 4.2 core profile
QOpenGLFunctions_4_3_Compatibility | All functions for OpenGL 4.3 compatibility profile
QOpenGLFunctions_4_3_Core | All functions for OpenGL 4.3 core profile
QOpenGLFunctions_4_4_Compatibility | All functions for OpenGL 4.4 compatibility profile
QOpenGLFunctions_4_4_Core | All functions for OpenGL 4.4 core profile
QOpenGLFunctions_4_5_Compatibility | All functions for OpenGL 4.5 compatibility profile
QOpenGLFunctions_4_5_Core | All functions for OpenGL 4.5 core profile
QOpenGLFunctions_ES2 | All functions for OpenGL ES 2
QOpenGLPaintDevice | Enables painting to an OpenGL context using QPainter
QOpenGLShader | Allows OpenGL shaders to be compiled
QOpenGLShaderProgram | Allows OpenGL shader programs to be linked and used
QOpenGLTexture | Encapsulates an OpenGL texture object
QOpenGLTimeMonitor | Wraps a sequence of OpenGL timer query objects
QOpenGLTimerQuery | Wraps an OpenGL timer query object
QAbstractOpenGLFunctions | The base class of a family of classes that expose all functions for each OpenGL version and profile
QOpenGLVertexArrayObject::Binder | QOpenGLVertexArrayObject::Binder class is a convenience class to help with the binding and releasing of OpenGL Vertex Array Objects
QOpenGLVertexArrayObject | Wraps an OpenGL Vertex Array Object
QBackingStore | Drawing area for QWindow
QBrush | Defines the fill pattern of shapes drawn by QPainter
QConicalGradient | Used in combination with QBrush to specify a conical gradient brush
QGradient | Used in combination with QBrush to specify gradient fills
QLinearGradient | Used in combination with QBrush to specify a linear gradient brush
QRadialGradient | Used in combination with QBrush to specify a radial gradient brush
QColor | Colors based on RGB, HSV or CMYK values
QPagedPaintDevice | Represents a paintdevice that supports multiple pages
QPageLayout | Describes the size, orientation and margins of a page
QPageSize | Describes the size and name of a defined page size
QPaintDevice | The base class of objects that can be painted on with QPainter
QPaintEngine | Abstract definition of how QPainter draws to a given device on a given platform
QPaintEngineState | Information about the active paint engine's current state
QTextItem | All the information required to draw text in a custom paint engine
QRasterPaintEngine | Enables hardware acceleration of painting operations in Qt for Embedded Linux
QPainter::PixmapFragment | This class is used in conjunction with the QPainter::drawPixmapFragments() function to specify how a pixmap, or sub-rect of a pixmap, is drawn
QPainter | Performs low-level painting on widgets and other paint devices
QPainterPath::Element | QPainterPath::Element class specifies the position and type of a subpath
QPainterPath | Container for painting operations, enabling graphical shapes to be constructed and reused
QPainterPathStroker | Used to generate fillable outlines for a given painter path
QPdfWriter | Class to generate PDFs that can be used as a paint device
QPen | Defines how a QPainter should draw lines and outlines of shapes
QPolygon | Vector of points using integer precision
QPolygonF | Vector of points using floating point precision
QRegion | Specifies a clip region for a painter
QRgba64 | Struct contains a 64-bit RGB color
QTransform | Specifies 2D transformations of a coordinate system
QAbstractTextDocumentLayout::PaintContext | QAbstractTextDocumentLayout::PaintContext class is a convenience class defining the parameters used when painting a document's layout
QAbstractTextDocumentLayout | Abstract base class used to implement custom layouts for QTextDocuments
QTextObjectInterface | Allows drawing of custom text objects in QTextDocuments
QAbstractTextDocumentLayout::Selection | QAbstractTextDocumentLayout::Selection class is a convenience class defining the parameters of a selection
QFont | Specifies a font used for drawing text
QFontDatabase | Information about the fonts available in the underlying window system
QFontInfo | General information about fonts
QFontMetrics | Font metrics information
QFontMetricsF | Font metrics information
QGlyphRun | Direct access to the internal glyphs in a font
QSupportedWritingSystems | Used when registering fonts with the internal Qt fontdatabase
QRawFont | Access to a single physical instance of a font
QStaticText | Enables optimized drawing of text when the text and its layout is updated rarely
QSyntaxHighlighter | Allows you to define syntax highlighting rules, and in addition you can use the class to query a document's current formatting or user data
QTextCursor | Offers an API to access and modify QTextDocuments
QTextDocument | Holds formatted text
QTextDocumentFragment | Represents a piece of formatted text from a QTextDocument
QTextDocumentWriter | Format-independent interface for writing a QTextDocument to files or other devices
QTextBlockFormat | Formatting information for blocks of text in a QTextDocument
QTextCharFormat | Formatting information for characters in a QTextDocument
QTextFormat | Formatting information for a QTextDocument
QTextFrameFormat | Formatting information for frames in a QTextDocument
QTextImageFormat | Formatting information for images in a QTextDocument
QTextLength | Encapsulates the different types of length used in a QTextDocument
QTextListFormat | Formatting information for lists in a QTextDocument
QTextTableCellFormat | Formatting information for table cells in a QTextDocument
QTextTableFormat | Formatting information for tables in a QTextDocument
QTextLayout::FormatRange | QTextLayout::FormatRange structure is used to apply extra formatting information for a specified area in the text layout's content
QTextInlineObject | Represents an inline object in a QAbstractTextDocumentLayout and its implementations
QTextLayout | Used to lay out and render text
QTextLine | Represents a line of text inside a QTextLayout
QTextList | Decorated list of items in a QTextDocument
QTextBlock | Container for text fragments in a QTextDocument
QTextBlockGroup | Container for text blocks within a QTextDocument
QTextBlockUserData | Used to associate custom data with blocks of text
QTextFragment | Holds a piece of text in a QTextDocument with a single QTextCharFormat
QTextFrame | Represents a frame in a QTextDocument
QTextObject | Base class for different kinds of objects that can group parts of a QTextDocument together
QTextBlock::iterator | QTextBlock::iterator class provides an iterator for reading the contents of a QTextBlock
QTextOption | Description of general rich text properties
QTextOption::Tab
QTextTable | Represents a table in a QTextDocument
QTextTableCell | Represents the properties of a cell in a QTextTable
QDesktopServices | Methods for accessing common desktop services
QDoubleValidator | Range checking of floating-point numbers
QIntValidator | Validator that ensures a string contains a valid integer within a specified range
QRegExpValidator | Used to check a string against a regular expression
QValidator | Validation of input text

## Detailed Description

The Qt GUI module provides classes for windowing system integration, event handling, OpenGL and OpenGL ES integration, 2D graphics, imaging, fonts and typography. These classes are used internally by Qt's user interface technologies and can also be used directly, for instance to write applications using low-level OpenGL ES graphics APIs.

To include the definitions of the module's classes, use the following directive:

      #include <QtGui>

If you use qmake to build your projects, Qt GUI is included by default. To disable Qt GUI, add the following line to your `.pro` file:

      QT -= gui