binder icon indicating copy to clipboard operation
binder copied to clipboard

Add useful config options for hydrogen/Qt bindings

Open charbeljc opened this issue 3 years ago • 0 comments

Hi, congrats for your work, binder is amazing. Here is a patch adding some configuration options that I added to make bindings for hydrogen

This patch add options to the config file:

-field MyClass::field_y_dont_want
+include_before <qtcleanup.h>
+primitive QString

+include_before allow us to insert headers before <pyind11/pybind11.h> so we can put, eg

#undef slots

and make Python.h happy again when binding something using Qt with binder/pybind11.

-fieldallow us to opt out for a field you don't want +primitiveallows us to actually generate methods referencing the type without actually binding it. This works provided you have proper type_caster template instantiation in some included header.

Let me know what you think ! Regards, Charbel

charbeljc avatar Jun 23 '21 14:06 charbeljc