Start to implement QueryDialog