Hello @Cristian Laczko ,
Welcome to Microsoft Q&A forum.
Not 100% sure, as you shared only code snippets without information about the project type(I guess it’s Qt project?). But, are you sure it’s C# code? Looks like it’s C++ code.
I tested in a newly created simple C++ project, with default VS settings, and the operators shows correctly(align center).
Please check following options:
Tools => Options => Text Editor => C/C++ => Code Style => Formatting => Spacing => Spacing for operators => Binary operators => Insert spaces before and after binary operators.
Tools => Options => Text Editor => C/C++ => Code Style => Formatting => Spacing => Spacing for operators => Pointer/reference alignment => Align center.
Best Regards,
Tianyu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.