【发布时间】:2015-01-17 06:32:59
【问题描述】:
我有一个类似这样的基类项目:
基础.qml:
Item {
Thing {
id: theThing;
onMySignal: { console.log("The signal"); }
}
}
我正在尝试制作一个派生项目 - Derived.qml。
如何覆盖theThing 的onMySignal 处理程序?我试过这样的东西......
派生.qml:
Base {
theThing.onMySignal: { console.log("Do different things with theThing in Derived") }
}
但我找不到任何东西可以告诉我如何正确地表达这个语法,或者是否/如何实际去做!
【问题讨论】:
标签: qt inheritance qml handler qt-quick