Skip to content

Instantly share code, notes, and snippets.

@nrk
Created October 8, 2009 20:13
Show Gist options
  • Select an option

  • Save nrk/205355 to your computer and use it in GitHub Desktop.

Select an option

Save nrk/205355 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'Qt4'
include Qt
Application.new ARGV do
Widget.new do
button_quit = PushButton.new 'Click me to quit' do
connect(SIGNAL :clicked) { Application.instance.quit }
end
self.layout = VBoxLayout.new do
add_widget button_quit, 0, Qt::AlignCenter
end
set_window_title 'Ruby FTW!'
resize 300, 50
show
end
exec
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment