diff options
Diffstat (limited to 'korundum/rubylib/tutorials/p1/p1.rb')
-rw-r--r-- | korundum/rubylib/tutorials/p1/p1.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/korundum/rubylib/tutorials/p1/p1.rb b/korundum/rubylib/tutorials/p1/p1.rb new file mode 100644 index 00000000..87e5e1b9 --- /dev/null +++ b/korundum/rubylib/tutorials/p1/p1.rb @@ -0,0 +1,13 @@ +require 'Qt'
+
+ a = Qt::Application.new( ARGV )
+
+ hello = Qt::PushButton.new( "Hello world!", nil )
+ hello.resize( 100, 30 )
+
+ Qt::Object::connect( hello, SIGNAL('clicked()'), a, SLOT('quit()') )
+
+ a.setMainWidget( hello )
+ hello.show()
+
+ a.exec()
\ No newline at end of file |