You have to use Qt::CustomizeWindowHint as well. And don't use the frameless window hint, of course.