Инструменты пользователя

Инструменты сайта


products:pyrog:api:lastest:types:widgets:checkable_button

Текст документации сгенерирован автоматически из исходного кода.
Если обнаружили ошибку, отправьте об этом сообщение на 📧почту.

CheckableButton

Inherits: QPushButton

This class implements a checkable button

Attributes:

  • state_changed: Signal[bool] — Signal emits when the button is changed state

Constructor:

def CheckableButton.__init__(state: bool = True, enabled_text: str = 'Enabled', disabled_text: str = 'Disabled')

Creates a new instance of the CheckableButton

Parameters:

  • state: bool — current state of the button
  • enabled_text: str — displayed text when the button is enabled
  • disabled_text: str — displayed text when the button is disabled

Methods

set_enabled_text

def set_enabled_text(s: str)

Sets displayed text when the button is enabled

Parameters:

  • s: str — displayed text when the button is enabled

enabled_text

def enabled_text() -> str

Returns displayed text when the button is enabled

Returns:

  • str — text when the button is enabled

set_disabled_text

def set_disabled_text(s: str)

Sets displayed text when the button is disabled

Parameters:

  • s: str — displayed text when the button is disabled

disabled_text

def disabled_text() -> str

Returns displayed text when the button is disabled

Returns:

  • str — text when the button is disabled

set_state

def set_state(state: bool)

Sets state the button

Parameters:

  • state: bool — button state

state

def state() -> bool

Returns state the button

Returns:

  • bool — button state
products/pyrog/api/lastest/types/widgets/checkable_button.txt · Последнее изменение: 127.0.0.1