edifice.Button#
- class edifice.Button(title='', **kwargs)[source]#
Bases:
QtWidgetElement[QPushButton]Basic button widget.
Underlying Qt Widget QPushButton
Props
All props from
QtWidgetElementplus:- Parameters:
title (
str) – The button text
Set the
on_clickprop (inherited fromQtWidgetElement) to define the click behavior.Usage
Button(title="Click me", on_click=lambda _: print("Clicked!"))
Button on the right#
Methods
__init__([title])register_ref(reference)Registers provided
Referenceto this Element.set_key(key)Set the key of an
Element.Attributes
childrenThe children of this Element.
propsThe props of this Element.
underlyingThe underlying QWidget, which may not exist if this Element has not rendered.