mirror of
https://github.com/bec-project/bec_widgets.git
synced 2026-04-26 18:20:49 +02:00
14 lines
323 B
Python
14 lines
323 B
Python
from __future__ import annotations
|
|
|
|
from qtpy.QtCore import Signal
|
|
from qtpy.QtGui import QMouseEvent
|
|
from qtpy.QtWidgets import QLabel
|
|
|
|
|
|
class ClickableLabel(QLabel):
|
|
clicked = Signal()
|
|
|
|
def mouseReleaseEvent(self, ev: QMouseEvent) -> None:
|
|
self.clicked.emit()
|
|
return super().mouseReleaseEvent(ev)
|