-
Why does the boxes here overlap with each other? I am simply using the See image below: Where there's supposed to be 2 rows as shown here: The code in question,
|
Beta Was this translation helpful? Give feedback.
Answered by
bjorn
Dec 10, 2021
Replies: 1 comment 2 replies
-
The ListView {
for data in mongodb-documents : Rectangle {
background: red;
border-width: 5px;
border-color: blue;
clip: false;
height: text.height + 10px; // makes rectangle height of text plus space for border
text := Text {
x: 5px; // added to make sure the text isn't on the border
x: 5px;
text: data;
color: blue;
}
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
hbina
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
Rectangle
will not automatically take the size of theText
element inside. You could achieve this with a binding (though I'm not sure it's the best way):