How to display a QChar* object using a QLineEdit object
Hi i have filled a QChar* object with some values and i need to display them using QLineEdit object.Is there a way i can do that?.I have tried QLineEdit::setText() but it only takes a const QString object.any way around this will be highly appreciated.
here is a some code to what am trying to do
Code:
QChar* idata
= ime
->text
().
data();
geti[0] = idata[0];
geti[1] = idata[3];
geti[2] = idata[5];
geti[3] = idata[7];
displ->setText(geti);
Re: How to display a QChar* object using a QLineEdit object
Code:
QChar* idata
= ime
->text
().
data();
while(idata)
{
str.append(*idata);
++idata;
}
displ->setText(str);
but better would be
Code:
displ->setText(ime->text());