Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Qt Creator - External Tools : Obtain the value of a variable in .pro file
Forum Updated to NodeBB v4.3 + New Features

Qt Creator - External Tools : Obtain the value of a variable in .pro file

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
2 Posts 1 Posters 797 Views 1 Watching
  • 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.
  • benlauB Offline
    benlauB Offline
    benlau
    Qt Champions 2016
    wrote on last edited by
    #1

    Hello,

    I am writing a tool to work with Qt Creator. I would like to register it as an external tools. And it need two arguments to run: 1) Current editing file 2) The value of QML_IMPORT_PATH defined in pro/pri files. But I can't find a way to pass QML_IMPORT_PATH to external tools. Any suggestion for this problem?

    Thanks for any advise.

    1 Reply Last reply
    0
    • benlauB Offline
      benlauB Offline
      benlau
      Qt Champions 2016
      wrote on last edited by
      #2

      Finally I can not find a direct way to pass QML_IMPORT_PATH via External Tools interface. Instead, I write the value to a file and tell my tools where to find the files.

       write_file(qmlimport.path, QML_IMPORT_PATH)
      

      Then setup external tool:

      Executable : The path to the executable
      
      Arguments: %{CurrentDocument:FilePath} %{CurrentProject:Path}/qmlimport.path
      

      Reference: https://github.com/benlau/sparkqml

      1 Reply Last reply
      0

      • Login

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