require 'Qt'

#### CRASH ###
# param mismatch?
class Bug1 < TQt::PushButton
   def initialize(*k)
      super(*k)
   end
   def Bug1.test
      a = TQt::Application.new(ARGV)
      w = TQt::VBox.new
      hello = Bug1.new(a)
      hello.resize(100, 30)
      a.setMainWidget(w)
      hello.show()
      a.exec()
   end
end
#Bug1.test


#### MORE DEBUG INFO NEEDED ###
# missing method
class Bug2 < TQt::VBox
   def initialize(*k)
      super(*k)
   end
   def Bug2.test
      a = TQt::Application.new(ARGV)
      w = Bug2.new
      a.setMainWidget(w)
      w.show2()
      a.exec()
   end
end
#Bug2.test


#### MORE DEBUG INFO NEEDED ###
# missing prototype
class Bug2a < TQt::VBox
   def initialize(*k)
      super(*k)
   end
   def Bug2a.test
      a = TQt::Application.new(ARGV)
      w = Bug2a.new
      a.setMainWidget(w)
      w.show(p)
      a.exec()
   end
end
Bug2a.test


#### FIXED ###
# no such constructor for PushButton
class Bug3 < TQt::PushButton
   def initialize
      super
   end
   def Bug3.test
      a = TQt::Application.new(ARGV)
      hello = Bug3.new
      hello.resize(100, 30)
      a.setMainWidget(hello)
      hello.show()
      a.exec()
   end
end
#Bug3.test


#### FIXED ###
# no *class* variable/method resize in PushButton
class Bug4 < TQt::PushButton
   def initialize
      super
   end
   def Bug4.test
      hello = Bug4
      hello.resize(100, 30)
   end
end
#Bug4.test
