utilisation of QThread in gui