Pyqt5 简明教程

PyQt5 - BrushStyle Constants

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

In this chapter, we shall learn Brush Style Constants.

Brush Style Constants

下面给出画笔样式常量:

Given below are the 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

Crossing horizontal and vertical lines

Qt.BDiagPattern

Backward diagonal lines

Qt.FDiagPattern

Forward diagonal lines

Qt.DiagCrossPattern

Crossing diagonal lines

Predefined QColor Styles

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

Given below are the Predefined QColor Styles −

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

Crossing horizontal and vertical lines

Qt.BDiagPattern

Backward diagonal lines

Qt.FDiagPattern

Forward diagonal lines

Qt.DiagCrossPattern

Crossing diagonal lines

Predefined QColor Objects

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

Given below are the Predefined QColor Objects −

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 值选择自定义颜色。

Custom color can be chosen by specifying RGB or CMYK or HSV values.