handle all localhost requests inside Qt