我有一个QML文件Dialog.qml,它是ApplicationWindow,Tab.qml是Item。在TabView中有Dialog.qml中的选项卡是由Tab.qml形成的。我希望在Tab.qml中创建Qt,将其信号连接到Qt中的类,并将该选项卡添加到Dialog中。以下是代码的相关部分:
//Tab.qml
Item {
id: tb
anchors.fill: parent
//...here is signals and controls like RadioButtons and TextFields
}
//Dialog.qml
Applicatio
我正在尝试创建一个QML对象,它充当其他对象的包装器。下面是我的QML文件(Container.qml):
Item {
property string label
property Item control
Row {
Label {
text: label
}
// Not sure how to display the control assigned to the control property
}
}
我想要做的(在我的QML中使用这个组件)是这样的:
Container {