Most of Slicer core is implemented in C++ and most module widgets are composed of various Qt, CTK, and Slicer widgets. You can edit the GUI using Qt designer. You can use any of the C++ loadable modules in Slicer core as an example of adding observers and connections.