I am working on an application that will generate a scribus document
from a database of survey questions. The output of each question will
look a bit like this image: <a style="" href="http://imgur.com/ha2ag.png" target="_blank">http://imgur.com/ha2ag.png</a><br>
<br>The question text is inside the text frame itself. The response
options are in text frames of their own. In order to determine the
appropriate vertical position for the first response option, I need to
determine where scribus will wrap the text inside the text frame (the
width of the text frame is pre-determined). I first thought that I
could use QFontMetrics::boundingRect() to determine where the text
would need to be wrapped. However that seems dependent on the DPI of
the QPaintDevice that the text is drawn on and, in my testing, scribus
wraps text independent of the monitor DPI. Is that true?<br>
<br>Thus it seems that I need to emulate the word wrap logic in scribus
itself but I&#39;m having trouble locating that part of the scribus code.
It seems logical to me that the word wrap code would either be in or
called from PageItem_TextFrame::DrawObj_<div id=":6d" class="ii gt">Item() but if it&#39;s there, it&#39;s not obvious to me. Could someone help me locate the word wrap logic?<br><br>Drew<br></div>