def __init__(self):
QtWidgets.QColorDialog.__init__(self)
self.setOption(QtWidgets.QColorDialog.NoButtons)
"""
QColorDialog
[0] PyQt5.QtWidgets.QVBoxLayout
[1] PyQt5.QtWidgets.QWidget | Basic Color Grid
[2] PyQt5.QtWidgets.QLabel | Basic Color Label
[3] PyQt5.QtWidgets.QPushButton | Pick Screen Color Button
[4] PyQt5.QtWidgets.QLabel | Background for the colour preview
[5] PyQt5.QtWidgets.QWidget | Custom Color Grid
[6] PyQt5.QtWidgets.QLabel | Custom Color Label
[7] PyQt5.QtWidgets.QPushButton | Add to Custom Colors Button
[8] PyQt5.QtWidgets.QFrame | Hue Saturation Picker
[9] PyQt5.QtWidgets.QWidget | Intensity Slider
[10] PyQt5.QtWidgets.QWidget | Value and Preview
[11] PyQt5.QtWidgets.QDialogButtonBox | Dialog Buttons
[12] PyQt5.QtCore.QTimer | ???
"""
self.children()[10].children()[16].setText("&Hex:")
[self.children()[1].setParent(None) for elem in range(7)] # Remove elements 1-7
self.updateColor()
# Elements 0, 8, 9, 10, 11 are important
评论列表
文章目录