ruby script using qt hangs

  • Thread starter Michael Gebhart
  • Start date
M

Michael Gebhart

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
 
A

Alexander Kellett

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
 
M

Michael Gebhart

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
 
R

Richard Dale

Alexander said:
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
 
A

Alexander Kellett

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top