Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 Qt 在 Ruby 中编写一个应用程序,它将通过网络与其他实例进行通信。
如何将 Qt 的事件循环与 DRb 或 EventMachine 集成?
编辑:
我找到了答案,当我有更多时间时,我会发布它
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 end