forked from qt-creator/qt-creator
* add inline components to bind. * inserts inline components in the component that contains them (makes Context:lookupType simpler) * unify Context:lookupType overloads without adding extra heap allocations using a template (avoid code duplication) * add tests for inline components * warn about nested components * use model manager to load dependencies in tst_check (old test did not load dependencies and simply skipped all checks on imports) Fixes: QTCREATORBUG-24766 Fixes: QTCREATORBUG-24705 Change-Id: Ibcade7752cdaa08e960f66db3a724ab7fb3268cf Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
37 lines
722 B
QML
37 lines
722 B
QML
// nDiagnosticMessages=1
|
|
// InlineComponent.qml
|
|
import QtQuick 2.15
|
|
|
|
Item {
|
|
component LabeledImage: Column {
|
|
component NestedComp: Item {
|
|
}
|
|
property alias source: image.source
|
|
property alias caption: text.text
|
|
|
|
Image {
|
|
id: image
|
|
width: 50
|
|
height: 50
|
|
}
|
|
Text {
|
|
id: text
|
|
font.bold: true
|
|
}
|
|
}
|
|
|
|
Row {
|
|
LabeledImage {
|
|
id: before
|
|
source: "before.png"
|
|
caption: "Before"
|
|
}
|
|
LabeledImage {
|
|
id: after
|
|
source: "after.png"
|
|
caption: "After"
|
|
}
|
|
}
|
|
property LabeledImage selectedImage: before
|
|
}
|