Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] Creator: Spaces used instead of tabs despite "Tab only" policy
I use Creator to edit a non-source code file (extension is 'mls').
The tab policy under Tools->Options->Text Editor->Behavior->Tabs and Indentation is "Tabs only".
Still, sometimes the tab is replaced with spaces as I type.
How can I prevent this?
Sounds like a bug. I guess the bug tracker would be happy to know about this :-)
Interestingly, it creates spaces at first. If I hit tab again, the spaces are replaced with a single tab.
To to write a single tab, I have to hit the tab key twice.
(Sometimes - because sometimes hitting it once works just fine)
Now it sounds even more like a bug :-) "Link to the bug tracker":https://qt-project.org/wiki/ReportingBugsInQt
The trick before reporting is to create reliable "steps to repeat". I haven't been able to do that...yet.
andrep last edited by
Can you please list all the TextEditor/Behaviour settings? Is your tabsize equal to the indentsize?
Tabsize is 8, Indent size is 4.
Align continuation lines "With Spaces"
Enable automatic indentation: Yes
Backspace indentation: None
Tab key performs auto-indent: Never
andrep last edited by
So when you hit the tab key once, you get four spaces (for one level of indentation, that's not representable with tabs of size 8), and on the second press you get one "real" tab worth of 8 position? That would be "expected behaviour".
Well, if the "Tab policy" is "Tabs Only", I never expect to get spaces when I hit tab. It's a bit of a contradiction. But I see your point - and it's easy enough to change the settings. Thanks!
Charalambos last edited by
@andrep Hi, i have a similar problem but this time with tabs in between previously written code. So when i press TAB the right amount of spaces are created but when i DELETE one character at a time is removed. TAB only works if it is the first thing i write per line, e.g. if i enter more than 1 TAB and press DELETE the cursor goes back a TAB at a time and not a SPACE as in the previous example. Could you help? Thank you :)