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

retquire 'Qt'

a = TQt::Application.new(ARGV)

box = TQt::VBox.new()
box.resize(200, 120)

quit = TQt::PushButton.new('Quit', box)
quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold))

a.connect(quit, SIGNAL('clicked()'), SLOT('quit()'))

a.setMainWidget(box)
box.show

a.exec
exit