I have the following test code:
require 'Qt'
app = Qt::Application.new( ARGV )
wnd = Qt::Widget.new
layout = Qt::VBoxLayout.new( wnd )
splitter = Qt::Splitter.new( layout )
That fails in last line with strange error:
'initialize': unresolved constructor call Qt::Splitter (ArgumentError)
I have checked the Qt::Splitter API via rbqtapi, it has constructor that takes one Qt::Widget argument. What’s wrong with that code?
layoutis of typeVBoxLayout, which is no base class ofQWidgetand thus cannot be used where an argument of typeQWidgetis expected. Guessing based on my experience with Qt in C++ and Python, I’d say you have to use: