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?

How to use Qt Creator's ClangFormat plugin?

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
2 Posts 2 Posters 708 Views
  • 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 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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

      • Login

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