Created
April 4, 2012 00:10
-
-
Save denysonique/2296564 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Standard QtRuby: | |
Menu.new do | |
action = Action.new | |
action.text = 'say hi' | |
action.connect(SIGNAL :clicked) { puts 'hi' } | |
add_action(action) | |
action_quit = Action.new | |
action_quit.text = 'quit' | |
action_quit.connect(SIGNAL :clicked) do | |
$app.quit | |
end | |
add_action(action_quit) | |
end | |
# QtR: | |
menu do | |
item('say hi') { puts 'hi' } | |
item '&Quit' | |
do $app.quit | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment