How to integrate Boost.Asio main loop in GUI framework like Qt4 or GTK
Is there any way to integrate Boost.Asio with Qt4 (preferred) or GTK main loop? GTK provides poll(2) like API so technically is should be possible. Qt provides its own networking layer, however I prefer to use existing code written for Boost.Asio. I want to integrate them without using an additional thread. Is there any reference how to do this for Qt4 (preferred) or GTKmm? Thanks. Edit I want to clearify several things to make the answer easier. Both Qt and GTKmm provide "select like" functionality: http://qt-project.org/doc/qt-5.0/qtcore/qsocketnotifier.html http://www.gtkmm.org/docs/glibmm