Why did you use Qt::SubWindow? What happens if you omit it?