在Qt Installer gui Scripting API我看到
object[] findChildren(object parent, string objectName)
返回以 objectName 作为名称的 parent 的所有后代。
然后我写了
function Controller()
{
}
Controller.prototype.IntroductionPageCallback = function()
{
var widget = gui.currentPageWidget(); // get the current wizard page
if (widget != null) {
widget.title = "New title."; // set the page title
widget.MessageLabel.setText("New Message."); // set the welcome text
var list = gui.findChildren(widget, "*")
}
}
这几乎可以工作,我的意思是它更改了小部件 title
和 MessageLabel
。
但是执行安装程序(installer.exe --verbose
)会报错
Critical: Error: Unknown method return type: QList<QJSValue>
我该如何处理?
报告了类似的错误