严重:错误:未知方法返回类型:QList<QJSValue>

时间:2021-05-02 03:32:45

标签: javascript c++ qt qt5 qt-installer

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, "*")
    }
}

这几乎可以工作,我的意思是它更改了小部件 titleMessageLabel

但是执行安装程序(installer.exe --verbose)会报错

Critical: Error: Unknown method return type: QList<QJSValue>

我该如何处理?

看起来之前在 https://forum.qt.io/topic/95669/ifw-critical-error-unknown-method-return-type-qlist-qjsvalue-when-trying-to-call-findchildren

报告了类似的错误

0 个答案:

没有答案