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