Hi,
I tried it severaly times now but always failed. I want to make a ruby application that uses QT but I'm lacking information about it. I'm never succeding in getting that to work what I did. I know there is a ebook for 10$ but I really don't have the money and I'm no professional coder but a hobby coder.
So I wondered can anybody point me to free information about it ?
class RssShow < MainWindow
def initialize(app)
super() @app = app
end
end
# create and show dialog
if $0 == __FILE__
app = Qt::Application.new(ARGV)
dialog = RssShow.new(app)
app.mainWidget = dialog
dialog.show
app.exec
end
but it always fails and gives me that error:
$ ./rss-show.rb
/home/myuser/Desktop/rss.rb:15:in `const_missing': uninitialized constant MainWindow::WType_TopLevel (NameError)
from /home/myuser/Desktop/rss.rb:15:in `initialize'
from ./rss-show.rb:6:in `initialize'
from /usr/lib/ruby/1.8/Qt/qtruby.rb:1682:in `call'
from /usr/lib/ruby/1.8/Qt/qtruby.rb:1682:in `try_initialize'
from /usr/lib/ruby/1.8/Qt/qtruby.rb:1681:in `catch'
from /usr/lib/ruby/1.8/Qt/qtruby.rb:1681:in `try_initialize'
from ./rss-show.rb:14:in `new'
from ./rss-show.rb:14
Does anybody know why? Or can point me to further information about ruby and Qt?
···
--
greets
one must still have chaos in oneself to be able to give birth to a dancing star
If someone is itself familiar with ruby and qt maybe you can help me?
You are mixing Qt versions, and that won't work. The UIC file you generated came
from Qt 4, but the Qtruby stuff that you're working with looks to be for Qt 3.
You'll need to pick one version or the other and stick with it from both the Qt side
and the QtRuby side.
Sorry for some lobbying here, but maybe it helps.
What about Ruby Gnome2/GTK it is so well documented, or is it Qt for
some special reason? in that case please ignore this as noise on the
wire ... http://ruby-gnome2.sourceforge.jp/
Cheers
Robert
···
On 7/12/07, anansi <kazaam@oleco.net> wrote:
Hi,
I tried it severaly times now but always failed. I want to make a ruby
application that uses QT but I'm lacking information about it. I'm never
succeding in getting that to work what I did. I know there is a ebook
for 10$ but I really don't have the money and I'm no professional coder
but a hobby coder.
--
I always knew that one day Smalltalk would replace Java.
I just didn't know it would be called Ruby
-- Kent Beck
Hi,
I tried it severaly times now but always failed. I want to make a ruby
application that uses QT but I'm lacking information about it. I'm never
succeding in getting that to work what I did. I know there is a ebook
for 10$ but I really don't have the money and I'm no professional coder
but a hobby coder.
So I wondered can anybody point me to free information about it ?
class RssShow < MainWindow
def initialize(app)
super() @app = app
end
end
# create and show dialog
if $0 == __FILE__
app = Qt::Application.new(ARGV)
dialog = RssShow.new(app)
app.mainWidget = dialog
dialog.show
app.exec
end
but it always fails and gives me that error:
$ ./rss-show.rb
/home/myuser/Desktop/rss.rb:15:in `const_missing': uninitialized
constant MainWindow::WType_TopLevel (NameError)
from /home/myuser/Desktop/rss.rb:15:in `initialize'
from ./rss-show.rb:6:in `initialize'
from /usr/lib/ruby/1.8/Qt/qtruby.rb:1682:in `call'
from /usr/lib/ruby/1.8/Qt/qtruby.rb:1682:in `try_initialize'
from /usr/lib/ruby/1.8/Qt/qtruby.rb:1681:in `catch'
from /usr/lib/ruby/1.8/Qt/qtruby.rb:1681:in `try_initialize'
from ./rss-show.rb:14:in `new'
from ./rss-show.rb:14
Does anybody know why? Or can point me to further information about ruby
and Qt?
If someone is itself familiar with ruby and qt maybe you can help me?
You are mixing Qt versions, and that won't work. The UIC file you generated came
from Qt 4, but the Qtruby stuff that you're working with looks to be for Qt 3. You'll need to pick one version or the other and stick with it from both the Qt side
and the QtRuby side.
Caleb
Hi yes I did the ui file with qt4-designer but what do you mean with qtruby stuff? I just wanna use qt4 but where can I check which is used by ruby? I have qt4 installed!
@steffano: thanks for these links! I'ckeck them soon as this versioning problem is solved.
@robert: I heard a lot of good things about qt so I wanna work with it a bit
Does anybody know how I can check that just qt4 is used?
I'm working under ubuntu linux.
···
--
greets
one must still have chaos in oneself to be able to give birth to a dancing star
Hi yes I did the ui file with qt4-designer but what do you mean with
qtruby stuff? I just wanna use qt4 but where can I check which is used
by ruby? I have qt4 installed!
I can tell just by looking at the .rb file you generated when you ran "rbuic". On
my system (which is not ubuntu, so it may be different), the one for Qt4 is called
"rbuic4", and it generates a completely different type of output. The ui stuff
between Qt3 and Qt4 changed dramatically, and my guess is that whatever tutorial or
information you're using is geared for Qt3.
But the fact that you have both sets of qtruby toolkits installed will probably lead
to confusion. I would get rid of the qtruby for Qt3 if you want to stick with the
Qt4 version. You can fire up irb to find out what you're using:
@steffano: thanks for these links! I'ckeck them soon as this versioning
problem is solved.
@robert: I heard a lot of good things about qt so I wanna work with it a
bit
Sure I did some lobbying because it was not completely clear what you
wanted and I thought it might be helpful...
Stefano firmly defended QT and that got you somewhere I hope.
I do not think at all that QT is bad and I did not say so (scusami
Stefano se avessi dato 'sta impressione), I have no idea how it
integrates with Ruby, let us know more about it will you?
Cheers
Robert
···
On 7/13/07, anansi <kazaam@oleco.net> wrote:
--
I always knew that one day Smalltalk would replace Java.
I just didn't know it would be called Ruby
-- Kent Beck
So I had qt3 and qt4 mixed.. I need to wait for a fix of these packages now.
Caleb Tennis wrote:
···
Hi yes I did the ui file with qt4-designer but what do you mean with
qtruby stuff? I just wanna use qt4 but where can I check which is used
by ruby? I have qt4 installed!
--
greets
one must still have chaos in oneself to be able to give birth to a dancing star