hi everyone,

i want to display individual character from a string.

for example, i have a string ls:
Qt Code:
  1. QString ls = "iamastring";
To copy to clipboard, switch view to plain text mode 

i want to display the character one by one on the screen.
i tried to use a loop, but i get "invalid type error". here is my code:
Qt Code:
  1. for (int j = 0; j <= ls.length(); j ++)
  2. ui->label_temp->setText(ls[j]);
To copy to clipboard, switch view to plain text mode 

can anyone give me a help, please?
thanks in advance.