better use of qt objects