moving qt helper code