Hi
I am looking into writing data from a QTextEdit to a file format of my own design.
During research I looked at the code in QTextOdfWriter.
When this class is wrting a FrameFormat it uses the following code –
if (format.hasProperty(QTextFormat::BlockTopMargin))
writer.writeAttribute(foNS, QString::fromLatin1("margin-top"), pixelToPoint(qMax(qreal(0.), format.topMargin())) );
if (format.hasProperty(QTextFormat::BlockBottomMargin ))
writer.writeAttribute(foNS, QString::fromLatin1("margin-bottom"), pixelToPoint(qMax(qreal(0.), format.bottomMargin())) );
if (format.hasProperty(QTextFormat::BlockLeftMargin))
writer.writeAttribute(foNS, QString::fromLatin1("margin-left"), pixelToPoint(qMax(qreal(0.), format.leftMargin())) );
if (format.hasProperty(QTextFormat::BlockRightMargin) )
writer.writeAttribute(foNS, QString::fromLatin1("margin-right"), pixelToPoint(qMax(qreal(0.), format.rightMargin())) );

Note that is checking BlockTopMargin etc.

Should this in fact be FrameTopMargin etc?

Thanks