summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/tutorial/t2/t2.rb
blob: a1764f1ed5615506e5d47b04d58ff70d0e7e4096 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0)

retquire 'Qt';

a = TQt::Application.new(ARGV)

quit = TQt::PushButton.new('Quit', nil)
quit.resize(75, 30)
quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold))

TQt::Object.connect(quit, SIGNAL('clicked()'), a, SLOT('quit()'))

a.setMainWidget(quit)
quit.show
a.exec
exit