全文预览

QT实验报告

上传者:苏堤漫步 |  格式:doc  |  页数:13 |  大小:236KB

文档介绍
::slotList(intindex){QTextCursorcursor=ui->textEdit->textCursor();if(index!=0){QTextListFormat::Stylestyle=QTextListFormat::ListDisc;switch(index){default:case1:style=QTextListFormat::ListDisc;break;case2:style=QTextListFormat::ListCircle;break;case3:style=QTextListFormat::ListSquare;10break;case4:style=QTextListFormat::ListDecimal;break;case5:style=QTextListFormat::ListLowerAlpha;break;case6:style=QTextListFormat::ListUpperAlpha;break;}cursor.beginEditBlock();QTextBlockFormatblockFmt=cursor.blockFormat();QTextListFormatlistFmt;if(cursor.currentList()){//listFmt=cursor.currentList()->format();}else{listFmt.setIndent(blockFmt.indent()+1);blockFmt.setIndent(0);cursor.setBlockFormat(blockFmt);}listFmt.setStyle(style);cursor.createList(listFmt);cursor.endEditBlock();}else{QTextBlockFormatbfmt;

收藏

分享

举报
下载此文档