Fix conversion of widget image to texture, refs ticket #17

Two issues:

- The image needs to be cleared first on Qt5
- The transfer must be made with 4 components, since we have alpha
Code style reformatting
Make sure selection works even within active_widget, closes ticket #17 @4h