Using C++ GUI frameworks with Swift 5.9 for cross-platform desktop apps

Hello everyone,

is the new native C++ interoperability able to allow the usage of any C++ GUI frameworks, for example WxWidgets or Qt? would it be too difficult to create a Clang module map for importing that kind of huge libraries ?


Hi @acaland,
It should be possible to use Qt with C++ interop. As you noted, one would have to modularize Qt headers for that. As a starting point, you could try adding a module.modulemap file that declares a single module with all of the Qt headers that you need.
Let me know if that works, or if you run into any trouble!


For related topics also see A cross-platform UI for Swift, especially A cross-platform UI for Swift - #29 by sspringer.