Sorry, but I can't run it and check. But, indeed, as I read the code, everything looks good. Of course I could have overlooked something.
You are not using explicit z-ordering, so everything should be plainly along the top-bottom. If you do not see the rectangle, then it shouldn't be a problem of Z axis. Not seeing the rectangle at all can be a result of other bug. If the positions or anchors were miscalculated, yout rectangle could have ended up with proper Z, but Width=0, Height=0. But, as you have them hardcoded, it's rather impossible.
Another very important thing is - you have not said where do you observe the effect. Do you see it in the real running app, or in the Qt Designer or similar tool? Many times I've seen the QtDesigner really screwing up the rendering of a properly written and working screen. Be sure to check what the live application presents.
Btw. Have you tried inspecting he running layout with QtInspector? It will probably quickly show you where the rectangle has gone.
EDIT: Oh - and one more thing. Just in case, try this:
MainView {
id: mainView;
anchors.fill: background;
}
BottomBar {
id: bottomBar;
anchors.bottom: mainView.bottom;
anchors.left: mainView.left;
anchors.right: mainView.right;
height: 75;
}
I've changed the anchors so that the frames are ordered explicitely. It is setting the layout dependencies as root <- Bkg <- MV <- BBar instead of having them all parallel and independent. If the layout works. If the rectangle is not seen in this setup, then there's something really screwed up elsewhere.