In my application I have a few instances where I use QMdiArea and then a QMainWindow as a subwindow inside the area. When the QMainWindows are maximized their title bars seem to attach to the menu bar of the application. This is fine for the minimize, maximize and close features but the icon is also at the far left of the menu bar and pushes menu items over. The icon can be set to nothing which makes it invisble but when you left click near where the icon should be it opens up a context menu. I have tried everything to disable the context menu but with no success.

Any ideas?