[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby script using qt hangs

Michael Gebhart

10/6/2004 9:46:00 AM

Hi,

I've tried to use Qt with ruby. It seems to be really a killer app. So I
installed kdebindings-3.3 and wrote my first programm:

#!/usr/bin/ruby -w
require 'Qt'
a = Qt::Application.new(ARGV)
hello = Qt::PushButton.new("Hello World!", nil)
hello.resize(100, 30)
a.mainWidget = hello
hello.show()
a.exec()

Now, if I try to start the program it hangs up. I also tried other programs,
but when using require 'Qt' my program does not do anything. It hangs and I
can kill it only. Any idea what's happening here?

Thanks

Mike
4 Answers

Alexander Kellett

10/6/2004 11:15:00 AM

0

On Wed, Oct 06, 2004 at 06:54:49PM +0900, Michael Gebhart wrote:
> Now, if I try to start the program it hangs up. I also tried other programs,
> but when using require 'Qt' my program does not do anything. It hangs and I
> can kill it only. Any idea what's happening here?

please read the readmes :)
your shebang line should be
#!/usr/bin/qtrubyinit -w
at a guess

hope that helps,
Alex


Michael Gebhart

10/6/2004 11:31:00 AM

0

Hi,

I copied the code from a tutorial, so I've been sure, that it is correct.
But now it works. Many many thanks!!

Michael

Richard Dale

10/6/2004 12:03:00 PM

0

Alexander Kellett wrote:

> On Wed, Oct 06, 2004 at 06:54:49PM +0900, Michael Gebhart wrote:
>> Now, if I try to start the program it hangs up. I also tried other
>> programs, but when using require 'Qt' my program does not do anything. It
>> hangs and I can kill it only. Any idea what's happening here?
>
> please read the readmes :)
> your shebang line should be
> #!/usr/bin/qtrubyinit -w
> at a guess
>
> hope that helps,
> Alex
I asked about who needs to use qtrubyinit on the kdebindings list, and many
people don't even though they've got Intel processors. I've got a PowerPC,
and I never had problems with these hangs. There doesn't seem to be a
pattern to it.

-- Richard

Alexander Kellett

10/6/2004 12:22:00 PM

0

On Wed, Oct 06, 2004 at 09:04:56PM +0900, Richard Dale wrote:
> I asked about who needs to use qtrubyinit on the kdebindings list, and many
> people don't even though they've got Intel processors. I've got a PowerPC,
> and I never had problems with these hangs. There doesn't seem to be a
> pattern to it.

yeah. nod. my gentoo machine no longer needs it and my
debian machines don't need it either. guess it was some
bugs in my toolchain or something.

in any case. it provides a easy way to get a major startup
time improvement up so i'll keep it around for the moment.

anyways. glad the probelem was solved :)

cheers,
Alex