А что за тип WFlags? Qt::WFlags? Ничего не понимаю
Qt::WidgetFlags
This enum type is used to specify various window-system properties for the widget. They are fairly unusual but necessary in a few cases. Some of these flags depend on whether the underlying window manager supports them. (See the toplevel example for an explanation and example of their use.)