[Kde-bindings] Re: Re: qtruby: Qt::TextView issue?

Arash Abedinzadeh thunfisch at thunfisch.org
Thu Sep 23 13:27:01 UTC 2004


Richard Dale wrote:

> Please feel free to keep asking qtruby questions on this list.

Well, there are a lot of questions since I'm very new to all this. I
couldn't even manage to let qtruby load and draw a simple PNG file. This is
frustrating sometimes, because I'm sure that it's not qtruby's fault, but I
just can't find the mistakes in my code.

require 'Qt'

class MyImage < Qt::Widget
        def initialize
                super()
                @image = Qt::Image.new("/path/to/image.png")
        end
end

a = Qt::Application.new(ARGV)
w = MyImage.new
a.setMainWidget(w)
w.show
a.exec

Regarding to the QImage part of the C++ API documentation
(http://doc.trolltech.com/3.3/qimage.html#QImage-4) I'm doing the right
thing, right? I mean I create a new Qt::Image object with a path to an
image as the only argument. The main program starts but I just see an empty
widget, no picture. Isn't the picture initialized, not created etc. or did
I (again) miss something in the documentation?

> I spent an evening translating that from perl POD to ruby RDOC once,
> but managed to accidently wipe it out, and I've never got round to redoing
> the work. But that would probably be the most useful thing that would help
> you - I'll try and get that done again.
 
Ouch. That reminds me of some long mails I wrote and lost before I could
send them, because my browser ... well, ;(

Yes, I guess the best thing for me to do is to wait until you find the time
to redo the qtruby documentation translation instead of asking questions
which I could answer myself by learning some basics of C++ or even Perl.

Thanks again,

--
Arash




More information about the Kde-bindings mailing list