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. How to use Qt Creator's ClangFormat plugin?
Forum Updated to NodeBB v4.3 + New Features

How to use Qt Creator's ClangFormat plugin?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
2 Posts 2 Posters 714 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.
  • D Offline
    D Offline
    dave2
    wrote on 23 Nov 2019, 16:37 last edited by dave2
    #1

    My set-up:

    • Windows 10
    • Qt Creator 4.10.2
    • Microsoft Visual Studio 2017

    I have just enabled the ClangFormat plugin in Qt Creator, and then restarted Qt Creator as instructed.

    Now, how can I use ClangFormat? For example, how do I reformat a source file with the ClangFormat plugin?

    According to https://www.qt.io/blog/2019/04/17/clangformat-plugin-qt-creator-4-9 :

    "If you have this plugin enabled you can simply invoke the executable by the shortcut or apply formatting on save."
    

    Where is the ClangFormat command? What is its shortcut? How can apply formatting on save?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 23 Nov 2019, 19:40 last edited by
      #2

      Hi,

      It's explained in the Qt Creator manual.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2

      1/2

      23 Nov 2019, 16:37

      • Login

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