ruby script using qt hangs

Discussion in 'Ruby' started by Michael Gebhart, Oct 6, 2004.

  1. 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
     
    Michael Gebhart, Oct 6, 2004
    #1
    1. Advertising

  2. 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
     
    Alexander Kellett, Oct 6, 2004
    #2
    1. Advertising

  3. 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
     
    Michael Gebhart, Oct 6, 2004
    #3
  4. Michael Gebhart

    Richard Dale Guest

    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
     
    Richard Dale, Oct 6, 2004
    #4
  5. 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
     
    Alexander Kellett, Oct 6, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bakes

    Catch script hangs

    Bakes, Sep 27, 2009, in forum: Python
    Replies:
    2
    Views:
    293
    Sean DiZazzo
    Sep 28, 2009
  2. Andi B

    ASP Script Hangs

    Andi B, Mar 23, 2005, in forum: ASP General
    Replies:
    7
    Views:
    161
    Andi B
    Mar 24, 2005
  3. Adrian Petru Dimulescu

    ruby script hangs on regex match

    Adrian Petru Dimulescu, Jul 22, 2005, in forum: Ruby
    Replies:
    5
    Views:
    258
    William James
    Jul 23, 2005
  4. Tim Shadel

    Gem hangs => TCPSocket.write hangs

    Tim Shadel, Jul 23, 2005, in forum: Ruby
    Replies:
    1
    Views:
    425
    Ville Mattila
    Jul 24, 2005
  5. MiG
    Replies:
    1
    Views:
    104
    Tanaka Akira
    Sep 12, 2005
Loading...

Share This Page