Pyqt5 简明教程

PyQt5 - BrushStyle Constants

在本章中,我们将学习画笔样式常量。

Brush Style Constants

下面给出画笔样式常量:

Qt.NoBrush

No brush pattern

Qt.SolidPattern

Uniform color

Qt.Dense1Pattern

Extremely dense brush pattern

Qt.HorPattern

Horizontal lines

Qt.VerPattern

Vertical lines

Qt.CrossPattern

交叉水平线和垂直线

Qt.BDiagPattern

Backward diagonal lines

Qt.FDiagPattern

Forward diagonal lines

Qt.DiagCrossPattern

Crossing diagonal lines

Predefined QColor Styles

下面给出预定义的 QColor 样式:

Qt.NoBrush

No brush pattern

Qt.SolidPattern

Uniform color

Qt.Dense1Pattern

Extremely dense brush pattern

Qt.HorPattern

Horizontal lines

Qt.VerPattern

Vertical lines

Qt.CrossPattern

交叉水平线和垂直线

Qt.BDiagPattern

Backward diagonal lines

Qt.FDiagPattern

Forward diagonal lines

Qt.DiagCrossPattern

Crossing diagonal lines

Predefined QColor Objects

下面给出预定义的 QColor 对象:

Qt.white

Qt.black

Qt.red

Qt.darkRed

Qt.green

Qt.darkGreen

Qt.blue

Qt.cyan

Qt.magenta

Qt.yellow

Qt.darkYellow

Qt.gray

可以通过指定 RGB、CMYK 或 HSV 值选择自定义颜色。