from PyQt6 import QtWidgets


class ValidatorButton(QtWidgets.QToolButton):
    def __init__(self, status_tip="", *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.setToolTip(status_tip)

    def setActiveIcon(self, icon):
        super().setIcon(icon)

    def showStatusTip(self, event):
        if self.isEnabled():
            self.showStatusTip(event)
        else:
            self.showStatusTip(event)
