I got the soltion, I called the move(QPoint) function within mousePressEvent()