kdevelop 3.4, qt4, ruby installation problems

Wolfgang Rohdewald wolfgang at rohdewald.de
Tue Aug 28 00:36:36 BST 2007


Hi,

today I tried the qt ruby sample application. This is Ubuntu Feisty
with kdevelop 3.4, qt4, version 4.3.0-4ubuntu1, qtruby1.8 version
1.4.6.0-ubuntu1. Is this combination supposed to
work, or what versions should I install?


when I tried to run that sample app, I got

/home/wr/kws/kws.rb:14: `uninitialized constant Kws::WDestructiveClose' (NameError)
	from /usr/lib/ruby/1.8/Qt/qtruby.rb:1678:in `try_initialize'
	from /home/wr/kws/./main.rb:5:in `new'
	from /home/wr/kws/./main.rb:5

the source code is:
	def initialize()
        super( nil, "Kws", WDestructiveClose )

http://doc.trolltech.com/4.3/qt.html#WidgetFlags says WDestructiveClose is
obsolete, use Qt::WA_DeleteOnClose. So I changed that, now I got

/home/wr/kws/kws.rb:14: `unresolved constructor call Kws
' (ArgumentError)
	from /usr/lib/ruby/1.8/Qt/qtruby.rb:1678:in `try_initialize'
	from /home/wr/kws/./main.rb:5:in `new'
	from /home/wr/kws/./main.rb:5

the qmainwindow doc does not mention any string parameter for the constructor,
so I tried

        super( nil, Qt::WA_DeleteOnClose )

now I am getting

/usr/lib/ruby/1.8/Qt/qtruby.rb:1679: `unresolved constructor call Qt::ToolBar
' (ArgumentError)
	from ./kws.rb:17:in `initialize'
	from /home/wr/kws/./main.rb:5:in `new'
	from /home/wr/kws/./main.rb:5

and when I run the Ruby hello world example, I get

/home/wr/rhw/rhw.rb:8: `undefined method `caption=' for #<Qt::Widget:0xb624fac0>' (NoMethodError)
with this source code:
app = Qt::Application.new(ARGV)
widget = Qt::Widget.new
widget.setGeometry(50, 500, 400, 400)
widget.caption = "Hello World!"


-- 
Wolfgang




More information about the KDevelop mailing list