Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > ruby script using qt hangs

Reply
Thread Tools

ruby script using qt hangs

 
 
Michael Gebhart
Guest
Posts: n/a
 
      10-06-2004
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:ushButton.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
 
Reply With Quote
 
 
 
 
Alexander Kellett
Guest
Posts: n/a
 
      10-06-2004
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


 
Reply With Quote
 
 
 
 
Michael Gebhart
Guest
Posts: n/a
 
      10-06-2004
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
 
Reply With Quote
 
Richard Dale
Guest
Posts: n/a
 
      10-06-2004
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
 
Reply With Quote
 
Alexander Kellett
Guest
Posts: n/a
 
      10-06-2004
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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pass variables to arbitrary ruby script: ruby script.rb Mario Gr Ruby 3 07-04-2009 06:00 AM
Gem hangs => TCPSocket.write hangs Tim Shadel Ruby 1 07-24-2005 06:11 AM
ruby script hangs on regex match Adrian Petru Dimulescu Ruby 5 07-23-2005 02:23 AM
"ruby script.rb" versus "xterm -e ruby script.rb" Sy Ruby 0 04-16-2005 12:08 AM
Clear hangs up - & hangs up - & hangs up Sue Bilstein NZ Computing 26 03-07-2004 01:33 AM



Advertisments