Results 1 to 2 of 2

Thread: How to log data to a file

  1. #1
    Join Date
    Oct 2015
    Posts
    35
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11
    Thanks
    11

    Default How to log data to a file

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts

    Default Re: How to log data to a file

    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,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    rookee (25th November 2015)

Similar Threads

  1. Replies: 2
    Last Post: 13th January 2014, 08:27
  2. Replies: 10
    Last Post: 4th July 2013, 13:53
  3. Replies: 3
    Last Post: 8th June 2011, 07:36
  4. Reading XML file into a data file correctly?
    By falconium in forum Qt Programming
    Replies: 3
    Last Post: 9th May 2011, 19:55
  5. delete first row of data from .csv file?
    By babymonsta in forum Qt Programming
    Replies: 3
    Last Post: 20th May 2010, 04:39

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.