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. Qmake: defineReplace / defineTest - How to use more than one argument to custom function?
Forum Updated to NodeBB v4.3 + New Features

Qmake: defineReplace / defineTest - How to use more than one argument to custom function?

Scheduled Pinned Locked Moved Qt Creator and other tools
2 Posts 2 Posters 3.5k 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.
  • S Offline
    S Offline
    SlySven
    wrote on last edited by
    #1

    qmake allows custom functions, of either "Replace" type that returns a list of results that can be accessed with the "$$" prefix to the declared name or "Test" type that return a boolean that can be used as the4 test to a "scope". The "documentation":http://qt-project.org/doc/qt-5/qmake-language.html#replace-functions for these is a bit sparse and it seems to be the only reference! It is clear that accessing the first "argument" passed to the custom function is by the use of 1 or $${1} depending on the situation and I think I read somewhere that ARGS or $${ARGS} contains a count of the number of arguments passed. It has only just become clear to me (I had a thought whilst writing this out) that multiple arguments to the function are comma separated, which may not be something that would automatically have been guessed, though clearly subsequent arguments are 2 (or $${2}), 3, ... etc. . Perhaps the documentation could be enlarged a little to give some more examples? I'm posting this also as something others hunting for details might find; as it seems to be something that does not get a lot of use!

    1 Reply Last reply
    1
    • N Offline
      N Offline
      ningen
      wrote on last edited by
      #2

      I have the same question

      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