Custom MainToolbar

Hi everyone. I’m having a problem customizing the MainToolBar. It comes with a white background due to the toolbar header property called as header: MainToolBar {} in MainRootWindow.qml.To test the MainToolBar, i changed the toolbar’s color to blue and its radius to 25. I lowered its opacity. As you can see in the screenshot below, if the radius is set to 25, a white background remains due to the header. Also, I can’t put any margin between the toolbar and the main window. I’ve searched the QML documents and couldn’t find a solution to customize the header. Is there anyone who can help me with this?

@tacdin Since you are drawing a rounded rectangle, there will be unfilled space left on all four corners of the rectangle. This space will get filled with the color of the parent QML element.

ApplicationWindow is the parent of MainToolBar element and it’s color is not set hence it defaults to WHITE. If you set the color for ApplicationWindow then the left over space should get filled with your set color.

Hope it helps.