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] customizing templates for source/header files
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] customizing templates for source/header files

Scheduled Pinned Locked Moved Qt Creator and other tools
22 Posts 6 Posters 18.4k 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.
  • G Offline
    G Offline
    goetz
    wrote on last edited by
    #21

    I just checked the sources. The contents of a new header file is hard coded into Qt Creator. It is always of the format

    @
    #ifndef FILENAME_IN_UPPER_CASE_H
    #define FILENAME_IN_UPPER_CASE_H

    #endif // FILENAME_IN_UPPER_CASE_H
    @

    The only thing you can customize is a license template, that is prepended on the very top of the file.

    The same holds for a single new C++ source file, with the exception, that this one is plain empty (it only contains a single newline, and optionally the license template).

    I'm sorry - you will either need to hack Qt Creator (in file qt-creator-master/src/plugins/cppeditor/cppfilewizard.cpp) or live with the current "template".

    http://www.catb.org/~esr/faqs/smart-questions.html

    1 Reply Last reply
    0
    • mzimmersM Offline
      mzimmersM Offline
      mzimmers
      wrote on last edited by
      #22

      OK, I can live with that (though I do find it a bit surprising that it's not configurable).

      This is actually good news in a way...during the fact-finding while this thread was going on, I was starting to think I was crazy.

      Thanks, V.

      mz

      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