[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: rubyQT
From:       "Caleb Tennis" <caleb () aei-tech ! com>
Date:       2007-07-24 16:53:39
Message-ID: 37622.192.168.2.155.1185295969.squirrel () www ! aei-tech ! com
[Download RAW message or body]

> I wonder if you can help. I'm currently exploring rubyqt in conjunction
> with the latest QT4 libraries. However, I can't seem to get a TextEdit
> widget to refresh properly. My code runs correctly when I click the
> button that has a ruby function assigned to it, but the TextEdit field
> does not update until the ruby function completes.

Right.  When your go() slot is running, that's all that's happening in your program.
 Calls to the @textedit are put into the queue and will update and refresh the next
available opportunity the event loop runs, but that won't happen until you finish
running your slot.

If you need the program to be more responsive, you need to look into using a
Qt::Timer to call a slot repetetively.  That way Qt can go back to handling all of
the events in the event loop in between timer calls.

HTH,
Caleb


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic