refactoring qt work