Hey,
I have a Label and I want to put in a number and a text.
int a;
ui->label->setText(a "is the answer");
int a;
ui->label->setText(a "is the answer");
To copy to clipboard, switch view to plain text mode
but this does not work, because qt can not see a there as a number. Maybe someone can help me?
Also when I want the label to say a over b I would write "a/b" and use
int a;
int b;
ui->label->setNum(a/b);
int a;
int b;
ui->label->setNum(a/b);
To copy to clipboard, switch view to plain text mode
But obviously it calculates the result. I think it would also be possible if I could put Numbers in the setText function.
Bookmarks