summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/tutorial/t2/t2.rb
blob: b5e62bcabacad133415ec4c2ce9c381f1b1c2226 (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)

require '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