QT创建者的自动完成值是由StackLoader加载的文件中全局QML对象的自动完成值?
因此,在qml中,我可以声明一个类似的stackView:
ApplicationWindow {
Item{
id: globalObject
specialProperty: "xyz"
}
StackView{
id: sv
}
}
然后,我有一个按钮,该按钮将“ page1.qml”文件加载到stackView中。当程序运行时,我可以从Page1.qml中的代码访问GlobalObject,但是QTCreator的自动填充却忽略了此连接。在Page1.QML和Main.QML之间来回来回找到特殊属性的名称,尤其是在多个页面之间共享许多对象时,这不是很快。
通常,我想知道的是,是否有一种方法可以将响应链接到动态加载的对象或为IDE留下提示,即该文件中的以下对象可用于此文件中的以下对象?
So in QML, I can declare a stackview like this:
ApplicationWindow {
Item{
id: globalObject
specialProperty: "xyz"
}
StackView{
id: sv
}
}
Then I have a button which loads a "Page1.qml" file into the StackView. When the program runs, I can access the globalObject from code in Page1.qml but qtCreator's autocomplete is oblivious to this connection. It is not very quick to go back and forth between Page1.qml and main.qml to find the name of special property especially when there are many objects that have to be shared between multiple pages.
In general, what I want to know, is there a way to statically link a response to a dynamically loaded object or leave a hint for the IDE that the following objects in this file are available to this other file?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论