So I traced it to resizeEvent,
the method needed to call is
d->relayoutDocument();,
but is private so i can't call it directly,
it is bounded by if (old_width != now_width),
so questions are:
- how to call private member
- how to make old_width dirty, as calling resize event is quite simple
- which other member is calling this private member (of QPlainTextEdit)
member I traced it in is
{
Q_D(QPlainTextEdit);
if (e->oldSize().width() != e->size().width())
d->relayoutDocument();
d->_q_adjustScrollbars();
}
void QPlainTextEdit::resizeEvent(QResizeEvent *e)
{
Q_D(QPlainTextEdit);
if (e->oldSize().width() != e->size().width())
d->relayoutDocument();
d->_q_adjustScrollbars();
}
To copy to clipboard, switch view to plain text mode
experimentaly verified with debugger (by tikering code flow) that d->_q_adjustScrollbars(); is NOT doing what it is supposed to,
d->relayoutDocument(); is the one I need,
So will there be any quick answer for any of my three questions or am I about to look inside the method where more exactly the problem is being solved?
Bookmarks