[Solved] Writing data to C execution file from QT Gui program
-
Using file is an option, but I wouldn't recommend it. Writing with one program and reading with the other might cause buffer overflows etc in your program. If there is data to be "transported" it might be a better option to use TCPIP connection to the home server. In Qt it is easy to setup and with signal/slots connections fast handling is achieved.
-
I am not getting buffer overflow using files but I am not getting present data. previous data only getting.
How can I setup tha TCPIP in Qt is there any site for this?
If it is,please provide me -
If you're one the same machine, you can have a look at "QLocalServer":http://qt-project.org/doc/qt-4.8/qlocalserver.html and "QLocalSocket":http://qt-project.org/doc/qt-4.8/qlocalsocket.html
And if you really want TCP/IP you have QTcpServer and QTcpSocket. Have a look at the examples provided along these classes, that will help you get started.
There is also QSharedMemory. Read all their docs to find what's the best solution for you.
-
C program and Qt both are on same machine only.
I have some doubt regarding using the server and socket programming in both C and QT,My c program will called by QT only and C program will run with QT in background, So can I use server and socket program or not?
If I use shared memory concept in QT then how can I get that data from shared memory in to C program?
-
You're not locked with Qt's IPC classes, you can use pure C IPC even with your Qt program.
By the way it's Qt, QT is for Apple's QuickTime :)
-
Which is best one Socket programming or Shared memory , to Send continuous data to C program from QT?
-
Is it possible with files?
Means from GUI we write data to the one file & same file is reading from c program? -
no. if we send the data from GUI to one file is OK but at a time reading same file from C program is not getting. It is reads only previous data it can not read present sending data
-
@Swinetha, you'll have to do some testing to see what suits your needs best
-
Sorry for the late replay, Now I can send the data using arguments. If it's needed in my project then I will use Socket programming or shared memory Thank you for giving the replies