summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/tutorial/t2/t2.rb
blob: 813eb78f3efaefd5a35e9b0374504074a145d455 (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, TQ_SIGNAL('clicked()'), a, TQ_SLOT('quit()'))

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