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. Creator: Template file for new class?
Forum Updated to NodeBB v4.3 + New Features

Creator: Template file for new class?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
5 Posts 2 Posters 817 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.
  • A Offline
    A Offline
    Asperamanca
    wrote on last edited by
    #1

    When I create a new class in Creator, I'd like it to be part of a specific namespace. Is there a way to add/modify a template for newly created classes, so the class is created inside a namespace (and I can add other stuff, as needed)?

    aha_1980A 1 Reply Last reply
    1
    • A Asperamanca

      When I create a new class in Creator, I'd like it to be part of a specific namespace. Is there a way to add/modify a template for newly created classes, so the class is created inside a namespace (and I can add other stuff, as needed)?

      aha_1980A Offline
      aha_1980A Offline
      aha_1980
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi @Asperamanca,

      it's documented here.

      Qt has to stay free or it will die.

      A 1 Reply Last reply
      2
      • aha_1980A aha_1980

        Hi @Asperamanca,

        it's documented here.

        A Offline
        A Offline
        Asperamanca
        wrote on last edited by
        #3

        @aha_1980
        Thanks. I've seen that one, but I hoped for something simpler, more in the line of the license template.

        aha_1980A 1 Reply Last reply
        0
        • A Asperamanca

          @aha_1980
          Thanks. I've seen that one, but I hoped for something simpler, more in the line of the license template.

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Asperamanca Well, for your use case it might be enought to edit the template file.cpp...

          Qt has to stay free or it will die.

          A 1 Reply Last reply
          3
          • aha_1980A aha_1980

            @Asperamanca Well, for your use case it might be enought to edit the template file.cpp...

            A Offline
            A Offline
            Asperamanca
            wrote on last edited by Asperamanca
            #5

            @aha_1980
            Do the templates come with the default installation of Creator? Because I can't even find the templates folder (at least not where the docs say it should be).
            Or do I just create the template files in the location they are supposed to be?

            Found it. Not where the docs say, but instead in the folder of the Qt installation (tools/QtCreator/share/qtcreator/templates)

            1 Reply Last reply
            1

            • Login

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