Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interface-type #66

Open
fabiencastan opened this issue Apr 24, 2012 · 2 comments
Open

interface-type #66

fabiencastan opened this issue Apr 24, 2012 · 2 comments

Comments

@fabiencastan
Copy link

Hi,

From the documentation of apiextractor, there is something dedicated to specify pure virtual classes:
http://www.pyside.org/docs/apiextractor/typesystem_specifying_types.html#interface-type
We have tried to use it but the generated wrapping tries to create an instance in the init function: Sbk_myNamespace_MyClass_Init().
So it seems to be ignored by shiboken, as it's written in the pyside history: "All interface-types replaced by object-types, because shiboken ignores interface-types."

What is the best way to expose an abstract class?

Regards,
Fabien

@fabiencastan
Copy link
Author

Hi again,

This error was due to a "unbinded" type used in one of the method of my pure virtual class (I forgot to declare it as a primitive type inside my typesystem xml file). Compilation was okai after correcting this.
By the way, I made a diff on generated wrappers using and tags and the code is exactly the same.

Is there however a reason to use interface-type instead of object-type? PySide typesystem only use object-type.
Is interface-type deprecated ?

@ghost
Copy link

ghost commented Sep 19, 2023

Hello @fabiencastan do you remember if you found any other solutions? when I define my abstract class as primitive, it jumps over the class and doesn't wrapp it. It doesn't even create the _wrapper.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant