Qt interop?
matkuki opened this issue Β· comments
Hi @n0bra1n3r
This project is fantastic πππ What are the possibilities to interface to Qt5/6 with it?
I don't have experience with cinterop
, other that compiling the example, so would it be feasable to create an intermediate Qt C++ header/source pair of files and use them in Nim
?
Thanks
Thanks!
There is no special code that makes this work with specific libraries. This is a generic layer that allows Nim code to interact with existing C++ code without any "code generation" steps in between. So this project doesn't generate any header/source pairs. This might help you understand what I mean.
Unless you have a specific example that shows how the C++ code in Qt can't be interfaced with via this project, I'm inclined to say that it should work with pretty much any C++ library. I'm already using it to interface with Diligent Engine which is a pretty massive C++ library, for example. I haven't used Qt though.
That being said, the overall effect of this project is that it moves the type checking from Nim to the C++ compiler that Nim invokes as part of the compilation process, so you will have to know a little bit of C++ to solve some corner cases.
Ah, thanks for the detailed explanation π
Will try out a few experiments.