chatdialog: Fix issue of creating QObjects in different thread.

Change-Id: I2f0dc2006cc330cd9d4fc5973eb475d841103b59