Widgets
- class Widget
Base class of all widgets.
- class Button(parent=None, text='')
Base class:
Widget
When clicked, pressed, or released the corresponding function is called.
- Parameters
- property on_click
The function that will be called when the button is clicked.
- property on_press
The function that will be called when the button is pressed.
- class ComboBox(parent=None, items=[])
Base class:
Widget
A comboBox with an unlimited number of items.
- Parameters
- property on_current_text_changed
The function that is called when the comboBox current item changes.
- add_items(items)
Add a list of items.
- class Label(parent=None, text='')
Base class:
Widget
A Widget which contains text.
- adjust_size()
Adjust the size of the label with the size of the text.
- class LineEdit(parent=None, text='')
Base class:
Widget
A single-line text input.
- property on_text_changed
The function that will be called when the text of the LineEdit changes.
- property on_selection_changed
"The function that will be called when the text selection is changed.
- adjust_size()
Adjust the size of the LineEdit with the size of the text.
- class ListBox(parent=None, items=[])
Base class:
Widget
A ListBox with several items in it which are selectable.
- Parameters
- class RadioButton(parent=None, text='')
Base class:
Widget
A RadioButton with a text label on the left.
- class Slider(parent=None, orientation=Orientation.HORIZONTAL, minimum=0, maximum=100, tick=Tick.NONE)
Base class:
Widget
An horizontal or vertical slider.
- Parameters
- property on_value_changed
The function that will be called when the value of the slider changes.
- property on_slider_pressed
The function that will be called when the slider is pressed.
- property on_slider_moved
The function that will be called when the slider is moved.
- class SpinBox(parent=None, value=0, minimum=0, maximum=100, step=1)
Base class:
Widget
An integer input.
- Parameters
- property on_value_changed
The function that is called when the SpinBox value changes.
- property on_text_changed
The function that is called when the SpinBox value changes, as string.
- clean_text()
Remove all non numeric text from the SpinBox.
- class TextEdit(parent=None, text='')
Base class:
Widget
A multi-line text input.
- property on_text_changed
The function that will be called when the text of the TextEdit changes.
- property on_selection_changed
"The function that will be called when the text selection is changed.
- adjust_size()
Adjust the size of the TextEdit with the size of the text.
- class Window(parent=None, name='')
Base class:
Widget
An empty widget on which it is possible to add other widgets.
- show()
Display the window on the screen when
Application.exec()
is called.
- close()
Closes the window.