Close treestore connection after constructing QueryForm.