Of course, to avoid all this, you could have created your own style, in which you override everything related to title bars, derived from one of the existing ones.
The title bar of a window is not handled by Qt but the underlying window system. Unfortunately you cannot alter the looks of a title bar with a custom style except for mdi/workspace child windows.
Bookmarks