Hello everyone!

I would like to know how to manage (with QtRuby) the optional parameter
from the constructor of a lot of classes (in Qt C++).

I join a quick example.

Thank you!

Here is the code:

require "Qt4"

class Tree < Qt::TreeWidget
  def initialize parent # = 0 ??? (or something like that)
                        # because I want this parameter to be
                        # optional like in the parent class
    super parent
  end
end

class Window < Qt::MainWindow
  def initialize
    super

    # I have to use self whereas I want NO parameter
    setCentralWidget Tree.new self
  end
end

if __FILE__ == $0
  a = Qt::Application.new ARGV

  g = Window.new
  g.show

  a.exec
end
-- 
Posted via http://www.ruby-forum.com/.