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. Running a python file from a qml button
Forum Update on Monday, May 27th 2025

Running a python file from a qml button

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 844 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.
  • M Offline
    M Offline
    Momoo
    wrote on 12 Sept 2018, 09:18 last edited by
    #1

    I am new in dealing with Qt and i would like to run a python file by clicking a qml button so anybody know how can i do it?
    Thanks in advance

    J W 2 Replies Last reply 12 Sept 2018, 09:29
    0
    • M Momoo
      12 Sept 2018, 09:18

      I am new in dealing with Qt and i would like to run a python file by clicking a qml button so anybody know how can i do it?
      Thanks in advance

      J Offline
      J Offline
      JonB
      wrote on 12 Sept 2018, 09:29 last edited by
      #2

      @Momoo
      In some shape or form, you will need to make your button's click action execute code which calls http://doc.qt.io/qt-5/qprocess.html functions, e.g. QProcess::execute().

      1 Reply Last reply
      4
      • M Momoo
        12 Sept 2018, 09:18

        I am new in dealing with Qt and i would like to run a python file by clicking a qml button so anybody know how can i do it?
        Thanks in advance

        W Offline
        W Offline
        wrosecrans
        wrote on 12 Sept 2018, 23:30 last edited by
        #3

        @Momoo
        Do you want to run a python script with an embedded interpreter in your process? Or just run a python script as an external process?

        1 Reply Last reply
        0

        1/3

        12 Sept 2018, 09:18

        • 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