Use Qt APIs with Swift 5.9 and the new C++ interoperability
-
Hello everyone,
at the latest WWDC Apple announced C++ interoperability from the upcoming Swift 5.9, allowing import and call C++ APIs from Swift and viceversa. More here:
https://www.swift.org/documentation/cxx-interop/#overviewIt seems that it's enough to import C++ headers file to be able to use the imported objects from Swift.
I am not expert at all the subject, but I am wondering if this interop would allow to use Qt SDK from Swift, without any language binding.
Swift is now cross platform (macOS, Linux, Windows) and with Qt would be a killer match.Would it be easy to test it out?
-
@Antonio-C I don't have an answer for you, unfortunately, but I 'm interested too about this possibility. Did you tried anything yet, did you have some success?
Regards.
-
cool idea!
-
This message might be a little outdated but today got published example of using Swift/CPP interoperability with CMake/XCode. There were some troubles for me with Ninja. it's described here
For now writing fully featured example of using Swift/CPP interoperability in Qt/QML applications. hope will find a time to finish it soon.