Open ghost opened 4 years ago
Looks like this is impossible.
The constructor being created (NewMyCustomButton
) will always accept just one argument - parent
of type widgets.QWidget_ITF
. And the function you provide as an "initializer" (init
) will always be called with no arguments.
So I think the only sensible way to achieve anything similar is to set required stuff after creating an instance of your class.
Hi,
I'm trying to subclass/extend a QWidget, actually its a QAbstractButton.
I noticed that the qtdeploy tool is automatically generating constructors as in the following case:
qtdeploy is generating "NewMyCustomButton()"
My question is: Is it possible to add arguments to the constructor, in the above example code I would want to pass val1 and val2 to the constructor.