Qt Code:
  1. void hi( const char *data )
  2. {
  3. printf( "%s", data );
  4. }
  5.  
  6. QString s = "....";
  7. QByteArray d = s.toUtf8();
  8. hi( d.constData() );
To copy to clipboard, switch view to plain text mode 

Cheers,
_[/QUOTE]

Btw this code is the .cpp or the .c file ?
I do not need to declare a QString now . as i am just using the ui->lineEdit->text(); to get the data