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. QtCreator file template syntax in wizard
Forum Updated to NodeBB v4.3 + New Features

QtCreator file template syntax in wizard

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 736 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.
  • Y Offline
    Y Offline
    Yaroslav Sabinin
    wrote on last edited by
    #1

    Hello everyone,

    I've started adjusting QtCreator's file templates and it works fine.
    The variables in the template files are references with

    %{var name}
    

    and I couldn't find any doc of generally available vars line "project name" or "timestamp". There's a template for a license file but it has another syntax for getting variable values. Also there're some expressions in those variable references like

    %{JS: Cpp.closeNamespaces('%{Class}')}
    

    Has anyone an idea where can I find a reference or a tutorial of what is possible in the wizard?

    Best regards,
    Yaroslav

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kuba
      wrote on last edited by
      #2

      The %{JS: expr} substitutions are JavaScript expressions. The value of the JavaScript expression is converted to a string. The JS engine has some additional Creator-specific properties in the global object - see the following SO question for details: http://stackoverflow.com/q/43763488/1329652

      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