Is it possible to add new GUI elements into a Qt program using QtScript? For instance assuming the variable “layout” is a vertical layout would this be acceptable?
var label = new QLabel("Text");
layout.addWidget(label);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Qt doesn’t ship with QtScript bindings; which bindings are you using?
If you’re using the bindings generator on Qt Labs, yes, this code would work fine, assuming you arranged for the `layout’ variable to be imported into your script engine.