获取行号和列号
int rowNum = ui->textEdit->document()->blockCount();
//获取光标所在行的行号
const QTextCursor cursor = ui->textEdit->textCursor();
int colNum = cursor.columnNumber();
//获取光标所在列的列号
int rowNum = ui->textEdit->document()->blockCount();
//获取光标所在行的行号
const QTextCursor cursor = ui->textEdit->textCursor();
int colNum = cursor.columnNumber();
//获取光标所在列的列号