forked from qt-creator/qt-creator
Merge remote-tracking branch 'origin/4.0'
Change-Id: Ied609608f6b12aa923c67777bc5a273c4d8fbcbb
This commit is contained in:
@@ -448,3 +448,19 @@ void TextBrowserHelpWidget::mouseReleaseEvent(QMouseEvent *e)
|
||||
|
||||
QTextBrowser::mouseReleaseEvent(e);
|
||||
}
|
||||
|
||||
void TextBrowserHelpWidget::setSource(const QUrl &name)
|
||||
{
|
||||
QTextBrowser::setSource(name);
|
||||
|
||||
QTextCursor cursor(document());
|
||||
while (!cursor.atEnd()) {
|
||||
QTextBlockFormat fmt = cursor.blockFormat();
|
||||
if (fmt.hasProperty(QTextFormat::LineHeightType) && fmt.lineHeightType() == QTextBlockFormat::FixedHeight) {
|
||||
fmt.setProperty(QTextFormat::LineHeightType, QTextBlockFormat::MinimumHeight);
|
||||
cursor.setBlockFormat(fmt);
|
||||
}
|
||||
if (!cursor.movePosition(QTextCursor::NextBlock))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user