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
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.
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.
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/
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
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?
I got out what the mistake is. It’s a ruby bug which makes it impossible
to install libqt4-ruby and rbuic for qt4 at the same time:
So I had qt3 and qt4 mixed… I need to wait for a fix of these packages
now.
Caleb T. 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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.