Home > Back-end >  QTextTable move QTextCursor to a determinated Cell
QTextTable move QTextCursor to a determinated Cell

Time:01-19

I have a QTextTable, I do some actions in the table and I want two things:

  • Return QTextCursor to cell (0,0)

  • Or move QTextCursor to cell (row, columnn)

How can I do?

CodePudding user response:

For the given table object of type QTextTable get desired cursor:

auto tableCell = table->cellAt(row, column);
auto cursor = tableCell.firstCursorPosition();

then enter image description here

This works fine.

  •  Tags:  
  • Related