Fix the bug caused by shared pointer and QObject.

Signed-off-by: CyberZHG <CyberZHG@gmail.com>