Problem with virtual const MyClass& = 0; as return value
Dynamic Python binding for Qt Applications
Brought to you by:
florianlink,
marcusbarann
Hey,
i have a problem with member functions like virtual const MyReturnValueClass& foo() const = 0;
I have the following class.
My Problem:
My PythonQTShell_Person get the following method implementation:
which simply does not compile.
Is there anyway to make it work (like a code injection, modify or anything like that), because rejection does not work because it is pure virtual method.
I'm using the lastest svn-trunk version from PythonQt and Qt 5.6.1 on Windows 7 x64 with Visual Studio 2010 SP1
Thanks in advance
Tonka
The problem is the const &, since PythonQt need to generate a shell class for the abstract class to allow deriving that class... If you don't need the shell class because you don't want to derive from that class in Python, then you can disable the shell generation for that class. Look in the typesystem files for "shell", there should be a keyword to disable the shell.
Injection for abstract functions is not yet supported.
Hey Florian,
thanks for answer. Reject from shell is a good option, i will try it. I also works when i reject the function and add a new one with inject-code, but the "remove from shell" is more my case.
Thx