Qt Forum

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

    Unsolved Executing external C programme in QT

    General and Desktop
    3
    3
    117
    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.
    • Q
      qtwithanzo last edited by qtwithanzo

      Hello,
      I am creating a simple widget application with a button. my intent is to execute a c code which is in separate file (simple.c) on the button click . Kindly help.

      jsulm JonB 2 Replies Last reply Reply Quote 0
      • jsulm
        jsulm Lifetime Qt Champion @qtwithanzo last edited by

        @qtwithanzo said in Executing external C programme in QT:

        Not sure if this is doable or not

        It is. See https://doc.qt.io/qt-5/qprocess.html

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 4
        • JonB
          JonB @qtwithanzo last edited by JonB

          @qtwithanzo
          Like @jsulm says if you mean you compile that simple.c into some runnable external program.

          But if by "separate file (simple.c)" you simply mean the code you want executed happens to be in a separate C file, but nothing to do with a separate program/executable, then you need to integrate simple.c into your Qt source project.

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