require 'Qt' a = TQt::Application.new( ARGV ) hello = TQt::PushButton.new( "Hello world!", nil ) hello.resize( 100, 30 ) TQt::Object::connect( hello, TQ_SIGNAL('clicked()'), a, TQ_SLOT('quit()') ) a.setMainWidget( hello ) hello.show() a.exec()