Skip to content

Instantly share code, notes, and snippets.

@acbart
Created March 4, 2022 11:52
Show Gist options
  • Select an option

  • Save acbart/0c9a7fa464290d7505129022411b84e0 to your computer and use it in GitHub Desktop.

Select an option

Save acbart/0c9a7fa464290d7505129022411b84e0 to your computer and use it in GitHub Desktop.
Example of GUIZero and Designer working together
from guizero import *
from designer import *
# GuiZero stuff
app = App(title="Main window", width=200, height=200)
text_1 = Text(app, text="X", color="red", size=20)
# Designer stuff
frog = emoji("frog")
grow(frog, 5)
# Code to update GUIZero's display
def handle_guizero(world):
world['app'].update()
when('updating', handle_guizero)
# Initial world has the app and the frog
start({
'app': app,
'frog': frog
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment