A QT 'Hello World' application
1) Installed Qt bindings for Ruby
- Running the application
1) From the command line I typed ruby helloworld_qt.rb
#file: helloworld_qt.rb 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()
Source code copied from KDE Tutorial - p1 [kde.org]