Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以使用 QtScript 将新的 GUI 元素添加到 Qt 程序中?例如,假设变量“布局”是垂直布局,这可以接受吗?
var label = new QLabel("Text"); layout.addWidget(label);
Qt 不附带 QtScript 绑定;您正在使用哪些绑定?
如果您在 Qt Labs 上使用绑定生成器,是的,假设您安排将“布局”变量导入脚本引擎,则此代码可以正常工作。