On this page

QCBrush Class

QCBrush is the base class for all QCPainter fill / stroke brushes. More...

Header: #include <QCBrush>
Inherited By:

QCBoxShadow, QCGradient, and QCImagePattern

Public Types

enum class BrushType { Brush, LinearGradient, RadialGradient, ConicalGradient, BoxGradient, …, Custom }

Public Functions

virtual QCBrush::BrushType type() const

Detailed Description

QCBrush is the base class for all styles used for QCPainter::fill() and QCPainter::stroke().

Member Type Documentation

enum class QCBrush::BrushType

Specifies the type of brush.

ConstantValueDescription
QCBrush::BrushType::Brush0- Empty brush.
QCBrush::BrushType::LinearGradient1- Interpolates colors between start and end points (QCLinearGradient)
QCBrush::BrushType::RadialGradient2- Interpolates colors between a focal point and end points on a circle surrounding it (QCRadialGradient).
QCBrush::BrushType::ConicalGradient3- Interpolates colors around a center point (QCConicalGradient).
QCBrush::BrushType::BoxGradient4- Interpolates colors on a round rectangle (QCBoxGradient).
QCBrush::BrushType::BoxShadow5- Creates a soft round rectangle shadow (QCBoxShadow).
QCBrush::BrushType::ImagePattern6- Creates a pattern using the specified image and repetition (QCImagePattern).
QCBrush::BrushType::Custom7- Creates a custom shader brush (QCCustomBrush).

See also type().

Member Function Documentation

[virtual] QCBrush::BrushType QCBrush::type() const

Returns the type of the brush. Subclasses override this method.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.