Qt Designer: develop custom widget plugin getting mouse events

If you want to develop a custom Qt widget to distrbute or sell a good habits is always to develop, in addition, a plugin working into Qt Designer allowing to visually use and configure your custom widget inside the designer GUI editor. Develop such plugin is not a difficult task, official documentation and examples are here and, as usual for Qt, all is well explained.