When you put a custom widget in the design window yuo will be prompt for a class name. In the properties window you can set a number of custom attributes in the form attribute:value. These attributes have different effect in C++, perl, python or XRC code generation. Four special attributes, $id, $parent, $width and $height are used in the constructor of the custom widget.