#!/usr/local/bin/ruby
require "qt2"
include Qt2

class QApplication
def initialize arg
   @firsttime = true
   @timer = startTimer(100)
   catchEvent
end
def timerEvent(e)
        Thread.pass
end
end



a = QApplication.new([$0]+ARGV)
codec = QTextCodec::codecForName("eucJP")
a.setDefaultCodec(codec)

th = Thread.start {
   a.exec()
}
print "Please enter command. \"quit\" for quit program.\n","ex) w = QWidget.new(); w.show\n"
