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.

Hi, I just saw the answer because I didn’t receive notification. I looked at the post before but didn’t realize it was answered. I’m sorry for that. The method you mentioned is very useful. Apart from that, I customized and recoded the toolbar.

hey,
i’ve been working on the customization of the UI can you help me out…
i’ve got struck at a point