Why you want to add WeakWidget to the viewport? SWeakWidget will be removed from memory if theres no reference to it during garbage collect. So if you really want to use WeakWidget keep a reference to it or just add your TestUIWidget to Viewport.
Edit:
I actually misunderstood concept of SWeakWidget so ignore this comment