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 Qt.white Qt.black Qt.red Qt.darkRed Qt.green Qt.darkGreen Qt.blue Qt.cyan Qt.magenta Qt.yellow Qt.darkYellow Qt.gray Custom color can be chosen by specifying RGB or CMYK or HSV values. Example The following example implements some of these methods. import sys from PyQt4.QtGui import * from PyQt4.QtCore import * class Example(QWidget): def __init__(self): super(Example, self).__init__() self.initUI()
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 Qt.white Qt.black Qt.red Qt.darkRed Qt.green Qt.darkGreen Qt.blue Qt.cyan Qt.magenta Qt.yellow Qt.darkYellow Qt.gray Custom color can be chosen by specifying RGB or CMYK or HSV values. Example The following example implements some of these methods. import sys from PyQt4.QtGui import * from PyQt4.QtCore import * class Example(QWidget): def __init__(self): super(Example, self).__init__() self.initUI()
pyqt-quickreff.docx