1);// 折叠为一行高度format.setBackground(QBrush(Qt::lightGray));// 可自定义折叠区域的背景色cursor.setPosition(foldPosition); cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, foldLength); cursor.setBlockFormat(format); } } cursor.endEditBlock(); }boolisFunctionStartLine(...
1);// 折叠为一行高度format.setBackground(QBrush(Qt::lightGray));// 可自定义折叠区域的背景色cursor.setPosition(foldPosition); cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, foldLength); cursor.setBlockFormat(format); } } cursor.endEditBlock(); }boolisFunctionStartLine(...
1);// 折叠为一行高度format.setBackground(QBrush(Qt::lightGray));// 可自定义折叠区域的背景色cursor.setPosition(foldPosition); cursor.movePosition(QTextCursor::NextCharacter, QTextCursor::KeepAnchor, foldLength); cursor.setBlockFormat(format); } } cursor.endEditBlock(); }boolisFunctionStartLine(...