1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-08 01:37:52 +01:00
Files
bec_widgets/bec_widgets/utils/clickable_label.py

14 lines
326 B
Python

from __future__ import annotations
from PySide6.QtGui import QMouseEvent
from qtpy.QtCore import Signal
from qtpy.QtWidgets import QLabel
class ClickableLabel(QLabel):
clicked = Signal()
def mouseReleaseEvent(self, ev: QMouseEvent) -> None:
self.clicked.emit()
return super().mouseReleaseEvent(ev)