Skip to content

Instantly share code, notes, and snippets.

@jason-s
Created November 19, 2014 23:15
Show Gist options
  • Save jason-s/5f884e80ffd8a7c15af7 to your computer and use it in GitHub Desktop.
Save jason-s/5f884e80ffd8a7c15af7 to your computer and use it in GitHub Desktop.
import enaml
from enaml.widgets.api import Window, Form, Label, Field, ComboBox
from enaml.stdlib.fields import IntField
from enaml.qt.qt_application import QtApplication
from atom.api import Int, Long, Atom
class Model(Atom):
longvalue = Long()
enamldef Main(Window):
attr model
Form:
Label:
text = 'IntField'
IntField:
value = model.longvalue
def main():
app = QtApplication()
model = Model()
view = Main(model=model)
view.show()
# Start the application event loop
app.start()
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment