Quote Originally Posted by anda_skoa View Post
Then why don't you use that?
I am using that in my .cpp file.
I am getting the String from a LineEdit in my cpp file called mainwindow
I followed ur code by setting this
Qt Code:
  1. QByteArray data=ui->lineEdit->text().toUtf8();
To copy to clipboard, switch view to plain text mode 

Now I want to pass the QByteArray data to the c file .
I am passing it to the c file to query it from the database using sqllite statment.

I tried calling the object from the cpp file to c file
Using
Qt Code:
  1. extern "C" QByteArray data;
To copy to clipboard, switch view to plain text mode 

But i dont think i am able to retrieve the data from the cpp file

I am getting errors such as unknown type "namespace".
.