Qt Forum

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

    Unsolved Add python script to QT program

    General and Desktop
    2
    2
    355
    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.
    • I
      isan last edited by

      I compiled QT 5.11.2 for raspberry pi and run the QT program on it
      Now I want to use Python code in my program, Python code gets input from QT program and after doing something, I need to get Python code output and use QT program
      How can add python script to my QT program?

      Pablo J. Rogina 1 Reply Last reply Reply Quote 0
      • Pablo J. Rogina
        Pablo J. Rogina @isan last edited by

        @isan I'd say you have two options:

        1. Embed a Python interpreter into the Qt application, see this post (it's Windows related but you'll get the idea)
        2. Call the Python script as a QProcess

        Upvote the answer(s) that helped you solve the issue
        Use "Topic Tools" button to mark your post as Solved
        Add screenshots via postimage.org
        Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

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