[SOLVED] Template wizard variables

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

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


    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

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

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

  • Yup fixed in my 2.8.81 build.

    p.s. strange version numbers.

  • Moderators

    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.

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

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.