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. [SOLVED] Template wizard variables
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Template wizard variables

Scheduled Pinned Locked Moved Qt Creator and other tools
5 Posts 3 Posters 1.6k 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.
  • B Offline
    B Offline
    Babalas
    wrote on last edited by
    #1

    I have a template to create some custom classes in qt creator. Here is a snippet:
    @
    <files>
    <file source="class.cpp" target="%ClassName%.%CppSourceSuffix%" openeditor="true" />
    <file source="class.h" target="%ClassName%.%CppHeaderSuffix%" openeditor="true" />
    </files>

    <fieldpagetitle>Class parameters</fieldpagetitle>
    <fields>
        <field name="ClassName">
            <fieldcontrol class="QLineEdit" validator="^[a-zA-Z0-9_]+$" defaulttext="" />
            <fielddescription>Class name:</fielddescription>
        </field>
        <field name="Namespace">
            <fieldcontrol class="QLineEdit" validator="^[a-zA-Z0-9_]+$" defaulttext="" />
            <fielddescription>Namespace:</fielddescription>
    

    @

    When I try to use this now instead of getting:
    FooClass.cpp and FooClass.h
    I get
    FooClass%.cpp% and FooClass%.h%

    If I drop the % at the end of the variable I then get
    %Classname.%CppSourceSuffix.

    I'm on qtcreator version 2.7.81, though I don't think that number ever changes. Master branch built May 27th.

    1 Reply Last reply
    0
    • 3 Offline
      3 Offline
      3.141592
      wrote on last edited by
      #2

      Should be fixed in Version 2.7.82 (2.8.0 beta)
      tested it with one of my wizards and it worked well

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Babalas
        wrote on last edited by
        #3

        Yup fixed in my 2.8.81 build.

        p.s. strange version numbers.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          Badalas: It is not 2.8 anymore and not 2.9 yet... what else should we use?

          Betas tend to be in the 80s, release candidates tend to have patchlevels in the 90s.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            Babalas
            wrote on last edited by
            #5

            Just noting that 2.7.82 is 2.8.0 beta. Does that mean 2.8.81 is 2.9.0 beta too?

            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