我想写一个使用Qt的Ruby应用程序,它将通过网络与其他实例进行通信。
如何将Qt的事件循环与DRb或EventMachine集成?
编辑:
我找到答案了,当我有更多时间的时候,我会把它贴出来。
发布于 2011-08-18 06:12:05
require 'eventmachine'
require 'Qt4'
app = Qt::Application.new(ARGV)
hello_button = Qt::PushButton.new("Hello EventMachine")
hello_button.resize(100,20)
hello_button.show
EventMachine.run do
EM.add_periodic_timer(0.01) do
app.process_events
end
endhttps://stackoverflow.com/questions/6591197
复制相似问题