::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;