PDA

View Full Version : How to log data to a file



rookee
25th November 2015, 04:26
Hi,

I'm trying to log live data to a file one after the other with a space between them, at the same time it should also update the readings on the Qlcds that I have in my application. Data that I want to access is in an array. Also I want to add a line of text(like below) to the file as soon as it is created. Can someone please help me how to do that. Thanks in advance.

act elmnt1 elmnt2 elmnt3 cm1 cm2

anda_skoa
25th November 2015, 08:41
In the function that updates the QLcd objects you just also write to the file.

See QFile and probably QTextStream.
Open the file once and keep it as a member of the class that also holds the QLcds.

Cheers,
_