You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdebindings/qtruby/rubylib/tutorial/t2/t2.rb

18 lines
338 B

#!/usr/bin/env ruby
$VERBOSE = true; $:.unshift File.dirname($0)
require 'Qt';
a = Qt::Application.new(ARGV)
quit = Qt::PushButton.new('Quit', nil)
quit.resize(75, 30)
quit.setFont(Qt::Font.new('Times', 18, Qt::Font::Bold))
Qt::Object.connect(quit, SIGNAL('clicked()'), a, SLOT('quit()'))
a.setMainWidget(quit)
quit.show
a.exec
exit