[Kde-bindings] Ruby Qt4 + net/http operations
Ruben Fonseca
rf at 7syntax.com
Wed Oct 1 08:51:21 UTC 2008
Hi @all!
I'm doing some experiments with Ruby Qt4 (using version 1.4.10 on Debian
unstable).
I was trying to build a GUI to a library I wrote that interacts with a
website using its API. However, I run into difficulties when trying to
integrate my library (that mainly uses net/http to make HTTP calls) with
Qt4.
AFAIK, Ruby Qt4 currently does not support QThread objects. Since my
library blocks on network operations, I couldn't find a way to integrate
it with Qt4.
I've tried to create a Ruby thread:
def button_clicked
Thread.new {
# do my blocking networking code
}
end
but the thread seems to freeze somehow during the network operation
(weird..)
the other think I've tried was to add the operation to a
QTimer.singleShot block. However, while the code is running, the entire
GUI is frozen (which I think makes sense).
Is it possible to do this kind of stuff with the current Qt4 Ruby
bindings?
Thank you
Ruben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20081001/6b04076b/attachment.sig>
More information about the Kde-bindings
mailing list