Qt Creator 中的代码折叠(#pragma region) [英] Code folding (#pragma region) in Qt creator
本文介绍了Qt Creator 中的代码折叠(#pragma region)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有类似于 Qt Creator 中用于折叠的显式代码区域的内容:
Is there something similar to explicit code regions for folding in Qt Creator:
#pragma region Region_1
void Test() {}
void Test2() {}
void Test3() {}
#pragma endregion Region_1
我可以看到折叠逻辑代码块,但不知道如何显式设置这样的块.我的Qt Creator版本是2.4.1
I can see folding for logical code blocks, but do not know how to explicitly set such a block. My version of Qt Creator is 2.4.1
推荐答案
我认为无论如何使用代码来构建代码会更好.恕我直言,C# 中的区域也不能很好地替代适当的结构化和保持可维护性.
I think it is better to structure your code by using code anyways. The regions as also found in C# are imho a bad substitute for proper structuring and keeping things maintainable.
这篇关于Qt Creator 中的代码折叠(#pragma region)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文