better handling of the qt stuff