summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/examples/qt-examples/aclock/main.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qtruby/rubylib/examples/qt-examples/aclock/main.rb')
-rwxr-xr-xqtruby/rubylib/examples/qt-examples/aclock/main.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/qtruby/rubylib/examples/qt-examples/aclock/main.rb b/qtruby/rubylib/examples/qt-examples/aclock/main.rb
new file mode 100755
index 00000000..dadbee15
--- /dev/null
+++ b/qtruby/rubylib/examples/qt-examples/aclock/main.rb
@@ -0,0 +1,15 @@
+#!/usr/bin/env ruby
+
+require 'Qt'
+require 'aclock'
+
+a = Qt::Application.new(ARGV)
+clock = AnalogClock.new
+ARGV.each {|arg|
+ clock.setAutoMask(true) if arg == '-transparent'
+}
+clock.resize(100, 100)
+a.setMainWidget(clock)
+clock.setCaption('QtRuby example - Analog Clock')
+clock.show
+a.exec