标签: python user-interface pyqt
有没有办法在QTextWidget中获取文本光标的当前行号?我无法在documentation.
答案 0 :(得分:1)
这已在How to get column number in qtextedit?
QTextCursor cursor = ui.textEdit->textCursor(); int y = cursor.blockNumber() + 1; int x = cursor.columnNumber() + 1;