How can I find QTextTable in QTextDocument?
Solved
General and Desktop
-
Hi guys,
I have QTextDocument and I need find all QTextTable's object and export them to CSV files.
How can I iterate all QTextDocument objects and find all QTextTable?
Thanks a lot!
-
@Alexey-Serebryakov Documentation (https://doc.qt.io/qt-6/qtextdocument.html) says:
"The entire document structure is stored as a hierarchy of document elements beneath the root frame, found with the rootFrame() function".
So, use rootFrame() and then https://doc.qt.io/qt-6/qtextframe.html#childFrames to get all frames and try to cast each of them to QTextTable. -