How to Drag and Move a Widget?

but when i press mouse button the widget will return the original position why?