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. How to run a Python script after building the project? qmake/CMake
Forum Updated to NodeBB v4.3 + New Features

How to run a Python script after building the project? qmake/CMake

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 346 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.
  • C Offline
    C Offline
    CuriousPan
    wrote on 23 Feb 2022, 14:27 last edited by
    #1

    I would like to run a Python scirpt for qmllint after building the project.
    I found QMAKE_POST_LINK, but I don't really understand how it works and how to run a python script using it.
    Why QMAKE_POST_LINK = system(python myScript.py) doesn't work?

    1 Reply Last reply
    0
    • B Offline
      B Offline
      Bonnie
      wrote on 24 Feb 2022, 03:32 last edited by Bonnie
      #2

      qmake will add the value of QMAKE_POST_LINK directly to the Makefile, so you cannot use qmake functions but direct commands.
      So I think it should be something like

      QMAKE_POST_LINK = path/to/python path/to/myScript.py
      
      1 Reply Last reply
      1

      1/2

      23 Feb 2022, 14:27

      • Login

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