forked from qt-creator/qt-creator
TaskDelegate: Use additional formats in text layout for sizeHints
Task-number: QTCREATORBUG-11621 Change-Id: I2be90e1814afcaab8c3c9a84e2682e5192dfe472 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -730,6 +730,7 @@ QSize TaskDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelInd
|
|||||||
int height = 0;
|
int height = 0;
|
||||||
description.replace(QLatin1Char('\n'), QChar::LineSeparator);
|
description.replace(QLatin1Char('\n'), QChar::LineSeparator);
|
||||||
QTextLayout tl(description);
|
QTextLayout tl(description);
|
||||||
|
tl.setAdditionalFormats(index.data(TaskModel::Task_t).value<ProjectExplorer::Task>().formats);
|
||||||
tl.beginLayout();
|
tl.beginLayout();
|
||||||
while (true) {
|
while (true) {
|
||||||
QTextLine line = tl.createLine();
|
QTextLine line = tl.createLine();
|
||||||
|
|||||||
Reference in New Issue
Block a user