graphs working in qt