ColumnLayout adding borders
-
In my case, adding a rectangle parent to this ColumnLayout is not an option. So I have found a solution like this and solved my problem.
- By the way, all I need was that adding a border around a ColumnLayout.
ColumnLayout { spacing: 0 //top line border Rectangle{ Layout.fillWidth: true height: 1 color: "black" } //create row layout for each element inside column layout RowLayout{ Rectangle{ Layout.fillHeight: true width: 1 color: "black" } // YOUR ELEMENTS HERE Rectangle{ Layout.fillHeight: true width: 1 color: "black" } } . . . //bottom line border Rectangle{ Layout.fillWidth: true height: 1 color: "black" } }