Derive a custom widget from existing widget

Hi All, I am a new user to the PhAB.
I just want to inherit one of the existing widget (say PtRect) to create my own custom widget, like in C++ class inheritance,

Class myRectWidget : Public PtRect
//My Additional functionality

Can i do so? If yes then How?

Any weblink or the procedure will be appericated.

No you can’t do this in C++, however someone wrote a C++ wrapper around the Photon lib. It’s been a while though, don’t remember the name, google is your friend.


He said, "like in C++" for which the answer is YES.   You can't program it in C++, but you can build a new widget on top of an older one.   If you look at the Widget documentation, it is obvious that the internal structure of widgets allows this.