Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    C-code and QThread

    General and Desktop
    1
    1
    728
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Jeroentjehome
      Jeroentjehome last edited by

      Hi all readers,
      At the moment I have to write some C-code for an embedded system, but because the hardware is far from ready I need to be able to debug my C-code in a simulation program. I used Qt to run the C-code and parse the GUI with C-code variables. No I also want to generate some graphs, but to minimize the effort I created a debugEngine (just a timer that stores C-code data into a file). The only down side to this mechanism is that the timer in the debugEngine isn't consistent enough when run at e.g. 10 msec.
      Because the C-code isn't able to use signal/slots or QThreads its a bit of a problem to get/set and parse the data between C and Qt code. Does anyone have a good suggestion how to do this? I was thinking of placing the DebugEngine into a QThread and create a "Getter/Setter" class that could be called from C and Qt code and that is threadsafe or do you guys have any better ideas??
      Greetz and happy coding!

      Greetz, Jeroen

      1 Reply Last reply Reply Quote 0
      • First post
        Last post