pikapython/test/python/PikaUI/test_page.py

19 lines
285 B
Python
Raw Normal View History

import PikaUI as ui
2023-02-22 21:59:28 +08:00
page1 = ui.Page().add(
ui.Text('Hello Page1')
)
class Page2(ui.Page):
def build(self):
2023-02-22 22:05:08 +08:00
_ = self.add(
2023-02-22 21:59:28 +08:00
ui.Text('Hello Page2')
)
app = ui.App()
2023-02-22 22:05:08 +08:00
app.pageManager.enter(page1)
app.pageManager.enter(Page2())
app.pageManager.back()