mirror of https://github.com/qt/qtdoc.git
Doc: update reusing qml example
Make UI visible on Qt Creator.Also use id instead of parent. Fixes: QTBUG-107030 Pick-to: 6.8 6.9 Change-Id: Ia856d214d3548e78c3b10a3e0b5e76d143986c7d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
parent
1f9d0b6267
commit
7630d832ee
|
@ -3,28 +3,31 @@
|
||||||
//![0]
|
//![0]
|
||||||
// application.qml
|
// application.qml
|
||||||
import QtQuick
|
import QtQuick
|
||||||
|
Window {
|
||||||
Column {
|
id: root
|
||||||
width: 180
|
width: 180
|
||||||
height: 180
|
height: 180
|
||||||
padding: 1.5
|
visible: true
|
||||||
topPadding: 10.0
|
Column {
|
||||||
bottomPadding: 10.0
|
anchors.fill: parent
|
||||||
spacing: 5
|
padding: 1.5
|
||||||
|
topPadding: 10.0
|
||||||
MessageLabel{
|
bottomPadding: 10.0
|
||||||
width: parent.width - 2
|
spacing: 5
|
||||||
msgType: "debug"
|
MessageLabel{
|
||||||
}
|
width: root.width - 2
|
||||||
MessageLabel {
|
msgType: "debug"
|
||||||
width: parent.width - 2
|
}
|
||||||
message: "This is a warning!"
|
MessageLabel {
|
||||||
msgType: "warning"
|
width: root.width - 2
|
||||||
}
|
message: "This is a warning!"
|
||||||
MessageLabel {
|
msgType: "warning"
|
||||||
width: parent.width - 2
|
}
|
||||||
message: "A critical warning!"
|
MessageLabel {
|
||||||
msgType: "critical"
|
width: root.width - 2
|
||||||
|
message: "A critical warning!"
|
||||||
|
msgType: "critical"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//![0]
|
//![0]
|
||||||
|
|
Loading…
Reference in New Issue