[Qt-creator] Tabs vs Spaces?

Bryan Bennetts bryan.bennetts at gmail.com
Fri Mar 6 22:40:29 CET 2020

Hi Jason,

You can use git smudge and clean filters so that local versions appear to
have spaces, but the remote has tabs. Having said that, I've fiddled with
them in the past for formatting they are a little scary IMHO.

Best plan is just to choose a format and get everyone to use it, regardless
of personal preference. 'this is the project format - suck it up.'

As the others have said clang-format is a popular formatter at the moment,
and is quite nicely integrated in QTC.

There are more than a few pre and post commit hooks out out on the Web to
auto clang format to the configuration in the root of the project
directory, the only shortfall I've seen in some is that they fail to format
the working version at the same time so the dev will see a difference
between the working version and the committed version that they might not


On Fri, 6 Mar 2020, 16:38 Jason H, <jhihn at gmx.com> wrote:

> I am a tabs guy. I change the Qt style to use tabs. I tab all the things!!
> Anyway, I now have other contributors to my project that are spaces
> people. How can we live in harmony? One side effect is that it seems git
> considers whitespace changes so his code is indented with spaces, mine are
> tabs and it's making a mess in git.
> Or should this be handled by git? (And if so, how?)
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20200306/79dc6ee6/attachment.html>

More information about the Qt-creator mailing list