aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2023-06-15 13:12:04 +0200
committerIvan Solovev <ivan.solovev@qt.io>2023-06-21 10:31:42 +0200
commit9203d5378e76bb98d899bf8a4dd3b38e23f0808c (patch)
tree2880a943e1dd8ed71b47ed92f31643add88455de /examples
parentccad38f304f5e3b8d25585330ec14527d39e290d (diff)
CoAP Multicast Discovery example: fix resource delegate height
The height of the delegate which shows the discovered resources was hardcoded to 60 px. It works fine until someone wants to increase the default system font size, in which case the data will not fit into the rectangle anymore. Fix it by using the implicitHeight of the Column which actually contains the data. As a drive-by - also add a bottom padding, to center the content in the delegate rectangle. Task-number: QTBUG-113858 Pick-to: 6.6 6.5 Change-Id: I25349005d2edf236ff9e685d7cd8519e30625f97 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/coap/quickmulticastclient/Main.qml4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/coap/quickmulticastclient/Main.qml b/examples/coap/quickmulticastclient/Main.qml
index 129978a..08047b1 100644
--- a/examples/coap/quickmulticastclient/Main.qml
+++ b/examples/coap/quickmulticastclient/Main.qml
@@ -176,14 +176,16 @@ Window {
required property string title
width: resourceView.width
- height: 60
+ height: contentColumn.implicitHeight
color: "lightgray"
border.color: "darkgray"
radius: 5
Column {
+ id: contentColumn
topPadding: 5
leftPadding: 5
+ bottomPadding: 5
Text { text: qsTr('<b>Host:</b> %1').arg(resourceItem.host) }
Text { text: qsTr('<b>Resource:</b> %1').arg(resourceItem.path) }
Text { text: qsTr('<b>Title:</b> %1').arg(resourceItem.title) }