Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Executing external C programme in QT
Forum Update on Monday, May 27th 2025

Executing external C programme in QT

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 269 Views
  • 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 Offline
    Q Offline
    qtwithanzo
    wrote on 4 Aug 2021, 11:21 last edited by qtwithanzo 8 Apr 2021, 11:23
    #1

    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.

    J J 2 Replies Last reply 4 Aug 2021, 11:22
    0
    • Q qtwithanzo
      4 Aug 2021, 11:21

      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.

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 4 Aug 2021, 11:22 last edited by
      #2

      @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
      4
      • Q qtwithanzo
        4 Aug 2021, 11:21

        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.

        J Offline
        J Offline
        JonB
        wrote on 4 Aug 2021, 11:27 last edited by JonB 8 Apr 2021, 11:28
        #3

        @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
        3

        1/3

        4 Aug 2021, 11:21

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved