0
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2025-07-14 03:31:50 +02:00

fix(palette viewer): fixed background for tool tip

This commit is contained in:
2024-09-14 18:57:50 +02:00
parent d15b22250f
commit 9045323049

View File

@ -167,7 +167,7 @@ class PaletteViewer(BECWidget, QWidget):
QLabel: The label with the background color.
"""
button = QLabel()
button.setStyleSheet(f"background-color: {color.name()};")
button.setStyleSheet(f"QLabel {{ background-color: {color.name()}; }}")
button.setToolTip("Click to copy color to clipboard")
button.setCursor(Qt.PointingHandCursor)
button.mousePressEvent = lambda event: QApplication.clipboard().setText(color.name())