コード例 #1
0
    def build(self):
        with enaml.imports():
            from hello_world_view import Main

        view = Main(message="Hello World, from Python!")
        view.show()

        return super(EnamlKvApp, self).build()
コード例 #2
0
def main():
    with enaml.imports():
        from hello_world_view import Main

    app = QtApplication()

    view = Main(message="Hello World, from Python!")
    view.show()

    # Start the application event loop
    app.start()
コード例 #3
0
def main():
    with enaml.imports():
        from hello_world_view import Main

    app = QtApplication()

    view = Main(message="Hello World, from Python!")
    view.show()

    # Start the application event loop
    app.start()
コード例 #4
0
ファイル: hello_world.py プロジェクト: agrawalprash/enaml
#------------------------------------------------------------------------------
#  Copyright (c) 2011, Enthought, Inc.
#  All rights reserved.
#------------------------------------------------------------------------------
import enaml

with enaml.imports():
    from hello_world_view import Main

view = Main(message="Hello, world, from Python!")
view.show()

コード例 #5
0
#------------------------------------------------------------------------------
#  Copyright (c) 2011, Enthought, Inc.
#  All rights reserved.
#------------------------------------------------------------------------------
import enaml
from enaml.stdlib.sessions import show_simple_view

if __name__ == '__main__':
    with enaml.imports():
        from hello_world_view import Main

    main_view = Main()
    show_simple_view(main_view)