QtGui

The QtGui module contains classes for windowing system integration, event handling, 2D graphics, basic imaging, fonts and text. Application developers would normally use this with higher level APIs such as those contained in the QtWidgets module.

Classes

QAbstractFileIconProvider

QIcon

QPainterStateGuard

QTextBlockGroup

QAbstractTextDocumentLayout

QIconDragEvent

QPaintEvent

QTextBlockUserData

QAction

QIconEngine

QPalette

QTextCharFormat

QActionEvent

QImage

QPdfOutputIntent

QTextCursor

QActionGroup

QImageIOHandler

QPdfWriter

QTextDocument

QBackingStore

QImageReader

QPen

QTextDocumentFragment

QBitmap

QImageWriter

QPicture

QTextDocumentWriter

QBrush

QInputDevice

QPixelFormat

QTextFormat

QChildWindowEvent

QInputEvent

QPixmap

QTextFragment

QClipboard

QInputMethod

QPixmapCache

QTextFrame

QCloseEvent

QInputMethodEvent

QPlatformSurfaceEvent

QTextFrameFormat

QColor

QInputMethodQueryEvent

QPointerEvent

QTextImageFormat

QColorConstants

QIntValidator

QPointingDevice

QTextInlineObject

QColorSpace

QKeyEvent

QPointingDeviceUniqueId

QTextItem

QColorTransform

QKeySequence

QPolygon

QTextLayout

QConicalGradient

QLinearGradient

QPolygonF

QTextLength

QContextMenuEvent

QMatrix2x2

QQuaternion

QTextLine

QCursor

QMatrix2x3

QRadialGradient

QTextList

QDesktopServices

QMatrix2x4

QRasterWindow

QTextListFormat

QDoubleValidator

QMatrix3x2

QRawFont

QTextObject

QDrag

QMatrix3x3

QRegion

QTextObjectInterface

QDragEnterEvent

QMatrix3x4

QRegularExpressionValidator

QTextOption

QDragLeaveEvent

QMatrix4x2

QResizeEvent

QTextTable

QDragMoveEvent

QMatrix4x3

QRgba64

QTextTableCell

QDropEvent

QMatrix4x4

QScreen

QTextTableCellFormat

QEnterEvent

QMouseEvent

QScrollEvent

QTextTableFormat

QEventPoint

QMoveEvent

QScrollPrepareEvent

QTouchEvent

QExposeEvent

QMovie

QSessionManager

QTransform

QFileOpenEvent

QNativeGestureEvent

QShortcut

QUndoCommand

QFileSystemModel

QOffscreenSurface

QShortcutEvent

QUndoGroup

QFocusEvent

QOpenGLContext

QShowEvent

QUndoStack

QFont

QOpenGLContextGroup

QSinglePointEvent

QUtiMimeConverter

QFontDatabase

QPagedPaintDevice

QStandardItem

QValidator

QFontInfo

QPageLayout

QStandardItemModel

QVector2D

QFontMetrics

QPageRanges

QStaticText

QVector3D

QFontMetricsF

QPageSize

QStatusTipEvent

QVector4D

QFontVariableAxis

QPaintDevice

QStyleHints

QVulkanExtension

QGlyphRun

QPaintDeviceWindow

QSurface

QVulkanInstance

QGradient

QPaintEngine

QSurfaceFormat

QVulkanLayer

QGuiApplication

QPaintEngineState

QSyntaxHighlighter

QWhatsThisClickedEvent

QHelpEvent

QPainter

QTabletEvent

QWheelEvent

QHideEvent

QPainterPath

QTextBlock

QWindow

QHoverEvent

QPainterPathStroker

QTextBlockFormat

QWindowStateChangeEvent

Functions

qAlpha(QRgba64) int

Returns the alpha component of rgba64 as an 8-bit value.

See also

alpha8(), alpha().


qAlpha(int) int

Returns the alpha component of the ARGB quadruplet rgba.

See also

qRgb(), alpha().


qBlue(QRgba64) int

Returns the blue component of rgba64 as an 8-bit value.

See also

blue8(), blue().


qBlue(int) int

Returns the blue component of the ARGB quadruplet rgb.

See also

qRgb(), blue().


qFuzzyCompare(QMatrix4x4, QMatrix4x4) bool

TODO


qFuzzyCompare(QQuaternion, QQuaternion) bool

TODO


qFuzzyCompare(QTransform, QTransform) bool

Returns true if t1 and t2 are equal, allowing for a small fuzziness factor for floating-point comparisons; false otherwise.


qFuzzyCompare(QVector4D, QVector4D) bool

TODO


qFuzzyCompare(QVector3D, QVector3D) bool

TODO


qFuzzyCompare(QVector2D, QVector2D) bool

TODO


qGray(int) int

This is an overloaded function.

Returns a gray value (0 to 255) from the given ARGB quadruplet rgb.

The gray value is calculated using the formula (R * 11 + G * 16 + B * 5)/32; the alpha-channel is ignored.


qGray(int, int, int) int

Returns a gray value (0 to 255) from the (r, g, b) triplet.

The gray value is calculated using the formula (r * 11 + g * 16 + b * 5)/32.


qGreen(QRgba64) int

Returns the green component of rgba64 as an 8-bit value.

See also

green8(), green().


qGreen(int) int

Returns the green component of the ARGB quadruplet rgb.

See also

qRgb(), green().


qPixelFormatAlpha(int, typeInterpretation: TypeInterpretation = UnsignedInteger) QPixelFormat

Constructor function for creating an Alpha format. A mask format can be described by passing 1 to channelSize. Its also possible to define very accurate alpha formats using doubles to describe each pixel by passing 8 as channelSize and FloatingPoint as typeInterpretation.

See also

TypeInterpretation.


qPixelFormatCmyk(int, alphaSize: int = 0, alphaUsage: AlphaUsage = IgnoresAlpha, alphaPosition: AlphaPosition = AtBeginning, typeInterpretation: TypeInterpretation = UnsignedInteger) QPixelFormat

Constructor function for creating CMYK formats. The channel count will be 4 or 5 depending on if alphaSize is bigger than zero or not. The CMYK color channels will all be set to the value of channelSize.

alphaUsage alphaPosition and typeInterpretation are all accessible with the accessors with the same name.

See also

TypeInterpretation.


qPixelFormatGrayscale(int, typeInterpretation: TypeInterpretation = UnsignedInteger) QPixelFormat

Constructor function for creating a Grayscale format. Monochrome formats can be described by passing 1 to channelSize. Its also possible to define very accurate grayscale formats using doubles to describe each pixel by passing 8 as channelSize and FloatingPoint as typeInterpretation.

See also

TypeInterpretation.


qPixelFormatHsl(int, alphaSize: int = 0, alphaUsage: AlphaUsage = IgnoresAlpha, alphaPosition: AlphaPosition = AtBeginning, typeInterpretation: TypeInterpretation = FloatingPoint) QPixelFormat

Constructor function for creating HSL formats. The channel count will be 3 or 4 depending on if alphaSize is bigger than 0.

channelSize will set the hueSize saturationSize and lightnessSize to the same value.

alphaUsage alphaPosition and typeInterpretation are all accessible with the accessors with the same name.


qPixelFormatHsv(int, alphaSize: int = 0, alphaUsage: AlphaUsage = IgnoresAlpha, alphaPosition: AlphaPosition = AtBeginning, typeInterpretation: TypeInterpretation = FloatingPoint) QPixelFormat

Constructor function for creating HSV formats. The channel count will be 3 or 4 depending on if alphaSize is bigger than 0.

channelSize will set the hueSize saturationSize and brightnessSize to the same value.

alphaUsage alphaPosition and typeInterpretation are all accessible with the accessors with the same name.


qPixelFormatRgba(int, int, int, int, AlphaUsage, AlphaPosition, premultiplied: AlphaPremultiplied = NotPremultiplied, typeInterpretation: TypeInterpretation = UnsignedInteger) QPixelFormat

Constructor function making an RGB pixelformat. redSize greenSize blueSize represent the size of each color channel. alphaSize describes the alpha channel size and its position is described with alphaPosition. alphaUsage is used to determine if the alpha channel is used or not. Setting the alpha channel size to 8 and alphaUsage to IgnoresAlpha is how it is possible to create a 32 bit format where the rgb channels only use 24 bits combined. premultiplied typeInterpretation are accessible with accessors with the same name.

See also

TypeInterpretation.


qPixelFormatYuv(YUVLayout, alphaSize: int = 0, alphaUsage: AlphaUsage = IgnoresAlpha, alphaPosition: AlphaPosition = AtBeginning, premultiplied: AlphaPremultiplied = NotPremultiplied, typeInterpretation: TypeInterpretation = UnsignedByte, byteOrder: ByteOrder = LittleEndian) QPixelFormat

Constructor function for creating a QPixelFormat describing a YUV format with yuvLayout. alphaSize describes the size of a potential alpha channel and is position is described with alphaPosition. The “first” “second” .. “fifth” channels are all set to 0. alphaUsage premultiplied typeInterpretation and byteOrder will work as with other formats.


qPremultiply(QRgba64) QRgba64

Converts an unpremultiplied QRgba64 quadruplet rgba64 into a premultiplied QRgba64 quadruplet.


qPremultiply(int) int

Converts an unpremultiplied ARGB quadruplet rgb into a premultiplied ARGB quadruplet.

See also

qUnpremultiply().


qRed(QRgba64) int

Returns the red component of rgba64 as an 8-bit value.

See also

red8(), red().


qRed(int) int

Returns the red component of the ARGB quadruplet rgb.

See also

qRgb(), red().


qRgb(int, int, int) int

Returns the ARGB quadruplet (255, r, g, b).


qRgba(int, int, int, int) int

Returns the ARGB quadruplet (a, r, g, b).


qRgba64(int) QRgba64

TODO


qRgba64(int, int, int, int) QRgba64

TODO


qt_set_sequence_auto_mnemonic(bool)

Specifies whether mnemonics for menu items, labels, etc., should be honored or not. On Windows and X11, this feature is on by default; on macOS, it is off. When this feature is off (that is, when b is false), mnemonic() always returns an empty string.

Note: This function is not declared in any of Qt’s header files. To use it in your application, declare the function prototype before calling it.

See also

QShortcut.


qUnpremultiply(QRgba64) QRgba64

Converts a premultiplied QRgba64 quadruplet rgba64 into an unpremultiplied QRgba64 quadruplet.


qUnpremultiply(int) int

Converts a premultiplied ARGB quadruplet rgb into an unpremultiplied ARGB quadruplet.

See also

qPremultiply().