diff options
Diffstat (limited to 'qtruby/rubylib/tutorial/t2/t2.rb')
-rwxr-xr-x | qtruby/rubylib/tutorial/t2/t2.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/qtruby/rubylib/tutorial/t2/t2.rb b/qtruby/rubylib/tutorial/t2/t2.rb new file mode 100755 index 00000000..8139e98c --- /dev/null +++ b/qtruby/rubylib/tutorial/t2/t2.rb @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby +$VERBOSE = true; $:.unshift File.dirname($0) + +require 'Qt'; + +a = Qt::Application.new(ARGV) + +quit = Qt::PushButton.new('Quit', nil) +quit.resize(75, 30) +quit.setFont(Qt::Font.new('Times', 18, Qt::Font::Bold)) + +Qt::Object.connect(quit, SIGNAL('clicked()'), a, SLOT('quit()')) + +a.setMainWidget(quit) +quit.show +a.exec +exit |