Look at the QString::arg() methods for formatting strings with extra arguments.
int a = 42;
QString formattedString
= QString( "%1 is the answer to life, the universe, and everything" ).
arg( a
);
int a = 42;
QString formattedString = QString( "%1 is the answer to life, the universe, and everything" ).arg( a );
To copy to clipboard, switch view to plain text mode
Cracking open a C++ textbook would help you, too. You should realize that
ui->label->setText( a "some string" );
ui->label->setText( a "some string" );
To copy to clipboard, switch view to plain text mode
isn't correct C++ syntax.
Bookmarks