From 355ecfb11c838b4c9facc9a631e04a52531a2127 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 18 Dec 2018 00:56:37 +0100 Subject: Add QTextMarkdownWriter::writeTable(QAbstractTableModel) This provides the ability to write live data from a table to Markdown, which can be useful to load it into a text document or a wiki. But so far QTextMarkdownWriter is still a private class, intended to be used experimentally from QtQuick and perhaps later exposed in other ways. Change-Id: I0de4673987e4172178604e49b5a024a05d4486ba Reviewed-by: Richard Moe Gustavsen --- src/gui/text/qtextmarkdownwriter_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/gui/text/qtextmarkdownwriter_p.h') diff --git a/src/gui/text/qtextmarkdownwriter_p.h b/src/gui/text/qtextmarkdownwriter_p.h index 9845355259..2a9388ca2d 100644 --- a/src/gui/text/qtextmarkdownwriter_p.h +++ b/src/gui/text/qtextmarkdownwriter_p.h @@ -56,6 +56,7 @@ #include "qtextdocument_p.h" #include "qtextdocumentwriter.h" +#include "QAbstractTableModel" QT_BEGIN_NAMESPACE @@ -64,6 +65,7 @@ class Q_GUI_EXPORT QTextMarkdownWriter public: QTextMarkdownWriter(QTextStream &stream, QTextDocument::MarkdownFeatures features); bool writeAll(const QTextDocument &document); + void writeTable(const QAbstractTableModel &table); int writeBlock(const QTextBlock &block, bool table, bool ignoreFormat); void writeFrame(const QTextFrame *frame); -- cgit v1.2.3