6

We're trying to find out how I can use the Qt code we wrote in a gtk-based application. Rumour has it that adapters are possible, in less than 600 LoC, but apparently all links lead to web pages covered in 6 years worth of dust.

So here's the question: how can I create a QCoreApplication that uses the gtk main loop?

xtofl
  • 40,723
  • 12
  • 105
  • 192
  • I think `QCoreApplication` uses a Glib main loop internally. I've never done it myself, but I think the pattern is to create a `QCoreApplication` and use its `exec()` method, which will run the Glib main loop, too. – Stefan Majewsky Aug 10 '12 at 07:54
  • @StefanMajewsky, apparently only on Linux? – ptomato Aug 10 '12 at 20:58
  • @ptomato: Probably yes. On Win/Mac, Qt will probably try to integrate with the system libraries' event loop to support native API calls. – Stefan Majewsky Aug 15 '12 at 12:06
  • 1
    Building Qt with glib with a mainloop is a build-time configuration flag. I don't know if it's enabled in most builds or not – Fabian Henze Jan 20 '13 at 21:27

0 Answers0