There are maximize and minimize buttons in the title bar when creating a QDialog window

Hello, after I created a QDialog, I found that there are maximize and minimize buttons in the window title bar. However, compared with other desktop environments, it is found that there is only one close button in the title bar after creating the QDialog window. Faced with this situation, is there any way I can set the title bar of this QDialog window separately?

I believe this is actually a Qt bug. @fusionfuture submitted patch to fix it ( but it seems to have gotten stuck.

Also @sitter who commented there

I don’t think it’s a qt bug.Because this window uses the system decoration .
I see that the decoraton in the kwin code finally seems to judge whether to draw the minimize button according to the type of the window.

According to the above code, even if I set the parent window of the dialog, the final returned result is still true.
I want to add the dialig type to isSpecialWindow(), but I’m not sure if this is the correct behavior, do we want to keep the possibility that the dialog can be maximized and minimized?