single instance method for qt application, find from internet