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¶
Functions¶
- qAlpha(QRgba64) int
Returns the alpha component of rgba64 as an 8-bit value.
- qAlpha(int) int
Returns the alpha component of the ARGB quadruplet rgba.
- qBlue(QRgba64) int
Returns the blue component of rgba64 as an 8-bit value.
- qBlue(int) int
Returns the blue component of the ARGB quadruplet rgb.
- 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.
- 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.
- qGreen(int) int
Returns the green component of the ARGB quadruplet rgb.
- 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
- 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
- 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
- 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
- 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.
See also
- qPremultiply(int) int
Converts an unpremultiplied ARGB quadruplet rgb into a premultiplied ARGB quadruplet.
See also
- qRed(QRgba64) int
Returns the red component of rgba64 as an 8-bit value.
- qRed(int) int
Returns the red component of the ARGB quadruplet rgb.
- 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
- qUnpremultiply(QRgba64) QRgba64
Converts a premultiplied QRgba64 quadruplet rgba64 into an unpremultiplied QRgba64 quadruplet.
See also
- qUnpremultiply(int) int
Converts a premultiplied ARGB quadruplet rgb into an unpremultiplied ARGB quadruplet.
See also