Unrelated to your topic, but I'd recommend not prefixing your custom classes with Q, this will generate confusion for people reading your code (you included) and might clash one day with Qt if they implement a class named like that.