Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Arthur Araruna last edited by
I'm having a lot of trouble understanding what am I supposed to to on the
drawimplementation of a
QAbstractTextDocumentLayoutspecialization I'm writing.
The problem is that I only receive a
PaintContext. I don't know much about all the things a
QPainteris capable of doing, as I'm still learning, but I believe there is not enough information for me to determine which block of the document I'm supposed to print first... The only thing I get is the cursor position, which is not enough information.
Should I just draw the whole document an then clip by the context's clip rectangle? Isn't this a waste of effort?
I'm implementing a document layout to be associated with a
QTextDocumentthat will be shown by a
I really need your help... What would help is an explanation about what is what in the parameters I get and how everything connects with the
QTextEditviewport, because the documentation of this method is terrible!!
Trilec last edited by Trilec
Sorry you did not get any feedback for your issue after so long, shows there must be a minimal use or understanding of this class. Did you get help or find solution you can share. I'm also trying to find help using this class and lack of doc is still there I'm afraid.
One possibility is to look at KoTextDocumentLayout.h and cpp files, these might help with some information.