edifice.Window¶
-
class
edifice.Window(title='Edifice Application', icon=None, menu=None, on_close=None)[source]¶ Bases:
edifice._component.RootComponentComponent that displays its child as a window.
Window will mount its child as a window. It can be created as a child of any standard container. This is useful if a window is logically associated with
class MyApp(Component): def render(self): return View()( Window(Label("Hello"), title="Hello"), ) if __name__ == "__main__": App(MyApp()).start()
- Parameters
title (
str) – the window titleicon (
Union[str,Sequence,None]) – the window iconmenu – the window’s menu bar. In some GUI settings, for example Mac OS, this menu will appear seperately from the window.
on_close (
Optional[Callable[[QCloseEvent],Any]]) – event handler for when this window is closed.
Methods
Callback function that is called when the component will unmount.
Attributes
childrenThe children of this component.
propsThe props of this component.