Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
I'm trying to change the text of a QLabel like this:
@movieTitle->setText(Title);@
Title is a QString. But that doesn't work. So I tested it by putting a word in quotes like:
@movieTitle->setText("Batman");@
And that works! I can't even fathom what this issue is. Any ideas? Thanks a million!
@ QLabel *m_label = new QLabel("New Label", this); m_label->setText("very new label");
QString text; text = "super new label"; m_label.setText(text); @
If you have not any error messages. please trace in the debug mode the value of your variable Title
Hi, what's the symptom for not working? Any error message? QLabel->setText() will work with a QString variable - try setting a new variable and test: @ QString c = "Batman"; movieTitle->setText(c); @
Initialize Title just before setText like this: Title="Hello"; movieTitle->setText(Title);
is it working now? review your code and check if "Title" has a Qstring value?