Overriding margins?
-
Hi all -
I've got an app laid out like this:
ApplicationWindow { id: mainWindow visible: true ColumnLayout { property real marginSize: mainWindow.width * 0.025 anchors { fill: parent leftMargin: marginSize rightMargin: marginSize bottomMargin: marginSize } Maintabbar {} Maincontent {} }I do this so that none of my components "crowd" the edges of the window. The drawback to this approach is my Maintabbar, which has a different colored background, gets the margin application as well:
I can think of some cumbersome ways to get around this, but...can anyone suggest a preferred way of getting my Maintabbar background to spread the entire window?
Thanks...
-
@mzimmers said in Overriding margins?:
Well, I have to use something to prevent Maincontent from overwriting Maintabbar.
ApplicationWindow { id: mainWindow visible: true menuBar: Maintabbar {} Maincontent { anchors { fill: parent margins: mainWindow.width * 0.025 } } }https://doc.qt.io/qt-6/qml-qtquick-controls2-applicationwindow.html#details

-
@mzimmers said in Overriding margins?:
Well, I have to use something to prevent Maincontent from overwriting Maintabbar.
ApplicationWindow { id: mainWindow visible: true menuBar: Maintabbar {} Maincontent { anchors { fill: parent margins: mainWindow.width * 0.025 } } }https://doc.qt.io/qt-6/qml-qtquick-controls2-applicationwindow.html#details

-
@mzimmers said in Overriding margins?:
Well, I have to use something to prevent Maincontent from overwriting Maintabbar.
ApplicationWindow { id: mainWindow visible: true menuBar: Maintabbar {} Maincontent { anchors { fill: parent margins: mainWindow.width * 0.025 } } }https://doc.qt.io/qt-6/qml-qtquick-controls2-applicationwindow.html#details
