使用调色板需要先导入:from PySide6.QtGui import QPalette
调色板QPalette的源代码:
class QPalette(Shiboken.Object):
class ColorGroup(enum.Enum):
Active : QPalette.ColorGroup = ... # 0x0
Normal : QPalette.ColorGroup = ... # 0x0
Disabled : QPalette.ColorGroup = ... # 0x1
Inactive : QPalette.ColorGroup = ... # 0x2
NColorGroups : QPalette.ColorGroup = ... # 0x3
Current : QPalette.ColorGroup = ... # 0x4
All : QPalette.ColorGroup = ... # 0x5
class ColorRole(enum.Enum):
WindowText : QPalette.ColorRole = ... # 0x0
Button : QPalette.ColorRole = ... # 0x1
Light : QPalette.ColorRole = ... # 0x2
Midlight : QPalette.ColorRole = ... # 0x3
Dark : QPalette.ColorRole = ... # 0x4
Mid : QPalette.ColorRole = ... # 0x5
Text : QPalette.ColorRole = ... # 0x6
BrightText : QPalette.ColorRole = ... # 0x7
ButtonText : QPalette.ColorRole = ... # 0x8
Base : QPalette.ColorRole = ... # 0x9
Window : QPalette.ColorRole = ... # 0xa
Shadow : QPalette.ColorRole = ... # 0xb
Highlight : QPalette.ColorRole = ... # 0xc
HighlightedText : QPalette.ColorRole = ... # 0xd
Link : QPalette.ColorRole = ... # 0xe
LinkVisited : QPalette.ColorRole = ... # 0xf
AlternateBase : QPalette.ColorRole = ... # 0x10
NoRole : QPalette.ColorRole = ... # 0x11
ToolTipBase : QPalette.ColorRole = ... # 0x12
ToolTipText : QPalette.ColorRole = ... # 0x13
PlaceholderText : QPalette.ColorRole = ... # 0x14
Accent : QPalette.ColorRole = ... # 0x15
NColorRoles : QPalette.ColorRole = ... # 0x16
@overload
def __init__(self) -> None: ...
@overload
def __init__(self, button: PySide6.QtCore.Qt.GlobalColor) -> None: ...
@overload
def __init__(self, button: Union[PySide6.QtGui.QColor, PySide6.QtGui.QRgba64, Any, PySide6.QtCore.Qt.GlobalColor, str, int]) -> None: ...
@overload
def __init__(self, button: Union[PySide6.QtGui.QColor, PySide6.QtGui.QRgba64, Any, PySide6.QtCore.Qt.GlobalColor, str, int], window: Union[PySide6.QtGui.QColor, PySide6.QtGui.QRgba64, Any, PySide6.QtCore.Qt.GlobalColor, str, int]) -> None: ...
@overload
def __init__(self, palette: Union[PySide6.QtGui.QPalette, PySide6.QtCore.Qt.GlobalColor, PySide6.QtGui.QColor]) -> None: ...
@overload
def __init__(self, windowTe