86 @type QPushButton |
86 @type QPushButton |
87 """ |
87 """ |
88 colorKey = button.property("colorKey") |
88 colorKey = button.property("colorKey") |
89 hasAlpha = button.property("hasAlpha") |
89 hasAlpha = button.property("hasAlpha") |
90 |
90 |
91 colDlg = QColorDialog(self) |
91 colDlg = QColorDialog(parent=self) |
92 if hasAlpha: |
92 if hasAlpha: |
93 colDlg.setOptions(QColorDialog.ColorDialogOption.ShowAlphaChannel) |
93 colDlg.setOptions(QColorDialog.ColorDialogOption.ShowAlphaChannel) |
94 # Set current color last to avoid conflicts with alpha channel |
94 # Set current color last to avoid conflicts with alpha channel |
95 colDlg.setCurrentColor(self.__coloursDict[colorKey][0]) |
95 colDlg.setCurrentColor(self.__coloursDict[colorKey][0]) |
96 colDlg.currentColorChanged.connect( |
96 colDlg.currentColorChanged.connect( |