434void QQuickTextPrivate::updateSize()
438 if (!q->isComponentComplete()) {
439 updateOnComponentComplete =
true;
443 if (!requireImplicitSize) {
444 implicitWidthChanged();
445 implicitHeightChanged();
447 if (requireImplicitSize)
451 qreal hPadding = q->leftPadding() + q->rightPadding();
452 qreal vPadding = q->topPadding() + q->bottomPadding();
454 const QSizeF previousSize(q->contentWidth(), q->contentHeight());
456 if (text.isEmpty() && !isLineLaidOutConnected() && fontSizeMode() == QQuickText::FixedSize) {
461 QFontMetricsF fm(font);
462 qreal fontHeight = qCeil(fm.height());
464 fontHeight = lineHeightMode() == QQuickText::FixedHeight
466 : fontHeight * lineHeight();
468 updateBaseline(fm.ascent(), q->height() - fontHeight - vPadding);
469 q->setImplicitSize(hPadding, fontHeight + qMax(lineHeightOffset(), 0) + vPadding);
470 layedOutTextRect = QRectF(0, 0, 0, fontHeight);
472 signalSizeChange(previousSize);
474 emit q->lineCountChanged();
475 updateType = UpdatePaintNode;
485 QRectF textRect = setupTextLayout(&baseline);
487 if (internalWidthUpdate)
490 layedOutTextRect = textRect;
491 size = textRect.size();
492 updateBaseline(baseline, q->height() - size.height() - vPadding);
494 widthExceeded =
true;
495 heightExceeded =
false;
497 extra->doc->setDefaultFont(font);
498 QQuickText::HAlignment horizontalAlignment = q->effectiveHAlign();
499 if (rightToLeftText) {
500 if (horizontalAlignment == QQuickText::AlignLeft)
501 horizontalAlignment = QQuickText::AlignRight;
502 else if (horizontalAlignment == QQuickText::AlignRight)
503 horizontalAlignment = QQuickText::AlignLeft;
506 option.setAlignment((Qt::Alignment)
int(horizontalAlignment | vAlign));
507 option.setWrapMode(QTextOption::WrapMode(wrapMode));
508 option.setUseDesignMetrics(renderType != QQuickText::NativeRendering);
509 extra->doc->setDefaultTextOption(option);
510 qreal naturalWidth = 0;
511 if (requireImplicitSize) {
512 extra->doc->setTextWidth(-1);
513 naturalWidth = extra->doc->idealWidth();
514 const bool wasInLayout = internalWidthUpdate;
515 internalWidthUpdate =
true;
516 q->setImplicitWidth(naturalWidth + hPadding);
517 internalWidthUpdate = wasInLayout;
519 if (internalWidthUpdate)
522 extra->doc->setPageSize(QSizeF(q->width(), -1));
523 if (q->widthValid() && (wrapMode != QQuickText::NoWrap || extra->doc->idealWidth() < availableWidth()))
524 extra->doc->setTextWidth(availableWidth());
526 extra->doc->setTextWidth(extra->doc->idealWidth());
528 QSizeF dsize = extra->doc->size();
529 layedOutTextRect = QRectF(QPointF(0,0), dsize);
530 size = QSizeF(extra->doc->idealWidth(),dsize.height());
533 qreal baseline = QFontMetricsF(font).ascent();
534 QTextBlock firstBlock = extra->doc->firstBlock();
535 if (firstBlock.isValid() && firstBlock.layout() !=
nullptr && firstBlock.lineCount() > 0)
536 baseline = firstBlock.layout()->lineAt(0).ascent();
538 updateBaseline(baseline, q->height() - size.height() - vPadding);
541 internalWidthUpdate =
true;
542 qreal oldWidth = q->width();
544 if (!q->widthValid())
545 iWidth = size.width();
547 q->setImplicitSize(iWidth + hPadding, size.height() + qMax(lineHeightOffset(), 0) + vPadding);
548 internalWidthUpdate =
false;
555 if (!qFuzzyCompare(q->width(), oldWidth) && !updateSizeRecursionGuard) {
556 updateSizeRecursionGuard =
true;
558 updateSizeRecursionGuard =
false;
561 q->setImplicitHeight(size.height() + lineHeightOffset() + vPadding);
563 QTextBlock firstBlock = extra->doc->firstBlock();
564 while (firstBlock.layout()->lineCount() == 0)
565 firstBlock = firstBlock.next();
567 QTextBlock lastBlock = extra->doc->lastBlock();
568 while (lastBlock.layout()->lineCount() == 0)
569 lastBlock = lastBlock.previous();
571 if (firstBlock.lineCount() > 0 && lastBlock.lineCount() > 0) {
572 QTextLine firstLine = firstBlock.layout()->lineAt(0);
573 QTextLine lastLine = lastBlock.layout()->lineAt(lastBlock.layout()->lineCount() - 1);
574 advance = QSizeF(lastLine.horizontalAdvance(),
575 (lastLine.y() + lastBlock.layout()->position().y() + lastLine.ascent()) - (firstLine.y() + firstBlock.layout()->position().y() + firstLine.ascent()));
582 signalSizeChange(previousSize);
583 updateType = UpdatePaintNode;
773QRectF QQuickTextPrivate::setupTextLayout(qreal *
const baseline)
777 bool singlelineElide = elideMode != QQuickText::ElideNone && q->widthValid();
778 bool multilineElide = elideMode == QQuickText::ElideRight
780 && (q->heightValid() || maximumLineCountValid);
782 if ((!requireImplicitSize || (implicitWidthValid && implicitHeightValid))
783 && ((singlelineElide && availableWidth() <= 0.)
784 || (multilineElide && q->heightValid() && availableHeight() <= 0.))) {
786 widthExceeded = q->widthValid() && availableWidth() <= 0.;
787 heightExceeded = q->heightValid() && availableHeight() <= 0.;
791 emit q->truncatedChanged();
795 q->setFlag(QQuickItem::ItemObservesViewport,
false);
796 emit q->lineCountChanged();
799 if (qFuzzyIsNull(q->width())) {
800 layout.setText(QString());
801 textHasChanged =
true;
804 QFontMetricsF fm(font);
805 qreal height = (lineHeightMode() == QQuickText::FixedHeight) ? lineHeight() : qCeil(fm.height()) * lineHeight();
806 *baseline = fm.ascent();
807 return QRectF(0, 0, 0, height);
810 bool shouldUseDesignMetrics = renderType != QQuickText::NativeRendering;
811 if (extra.isAllocated())
812 extra->visibleImgTags.clear();
813 layout.setCacheEnabled(
true);
814 QTextOption textOption = layout.textOption();
815 if (textOption.alignment() != q->effectiveHAlign()
816 || textOption.wrapMode() != QTextOption::WrapMode(wrapMode)
817 || textOption.useDesignMetrics() != shouldUseDesignMetrics) {
818 textOption.setAlignment(Qt::Alignment(q->effectiveHAlign()));
819 textOption.setWrapMode(QTextOption::WrapMode(wrapMode));
820 textOption.setUseDesignMetrics(shouldUseDesignMetrics);
821 layout.setTextOption(textOption);
823 if (layout.font() != font)
824 layout.setFont(font);
826 lineWidth = (q->widthValid() || implicitWidthValid) && q->width() > 0
829 qreal maxHeight = q->heightValid() ? availableHeight() : FLT_MAX;
831 const bool customLayout = isLineLaidOutConnected();
832 const bool wasTruncated = truncated;
834 bool canWrap = wrapMode != QQuickText::NoWrap && q->widthValid();
836 bool horizontalFit = fontSizeMode() & QQuickText::HorizontalFit && q->widthValid();
837 bool verticalFit = fontSizeMode() & QQuickText::VerticalFit
838 && (q->heightValid() || (maximumLineCountValid && canWrap));
840 const bool pixelSize = font.pixelSize() != -1;
841 QString layoutText = layout.text();
843 const qreal minimumSize = pixelSize
844 ?
static_cast<qreal>(minimumPixelSize())
845 : minimumPointSize();
846 qreal largeFont = pixelSize ? font.pixelSize() : font.pointSizeF();
847 qreal smallFont = fontSizeMode() != QQuickText::FixedSize
848 ? qMin<qreal>(minimumSize, largeFont)
850 qreal scaledFontSize = largeFont;
851 const qreal sizeFittingThreshold(0.01);
853 bool widthChanged =
false;
854 widthExceeded = availableWidth() <= 0 && (singlelineElide || canWrap || horizontalFit);
855 heightExceeded = availableHeight() <= 0 && (multilineElide || verticalFit);
859 QFont scaledFont = font;
861 int visibleCount = 0;
868 bool noBreakLastLine = multilineElide && (wrapMode == QQuickText::Wrap || wrapMode == QQuickText::WordWrap);
870 int eos = multilengthEos;
878 scaledFont.setPixelSize(scaledFontSize);
880 scaledFont.setPointSizeF(scaledFontSize);
881 if (layout.font() != scaledFont)
882 layout.setFont(scaledFont);
885 layout.beginLayout();
887 bool wrapped =
false;
888 bool truncateHeight =
false;
891 int unwrappedLineCount = 1;
892 const int maxLineCount = maximumLineCount();
894 qreal naturalHeight = 0;
895 qreal previousHeight = 0;
900 for (visibleCount = 1; ; ++visibleCount) {
901 line = layout.createLine();
903 if (noBreakLastLine && visibleCount == maxLineCount)
904 layout.engine()->option.setWrapMode(QTextOption::WrapAnywhere);
906 setupCustomLineGeometry(line, naturalHeight, layoutText.size());
908 setLineGeometry(line, lineWidth, naturalHeight);
910 if (noBreakLastLine && visibleCount == maxLineCount)
911 layout.engine()->option.setWrapMode(QTextOption::WrapMode(wrapMode));
913 unelidedRect = br.united(line.naturalTextRect());
917 if (multilineElide && naturalHeight > maxHeight && visibleCount > 1) {
919 heightExceeded =
true;
924 truncateHeight =
true;
928 const QTextLine previousLine = layout.lineAt(visibleCount - 1);
929 elideText = layoutText.at(line.textStart() - 1) != QChar::LineSeparator
930 ? elidedText(line.width(), previousLine, &line)
931 : elidedText(line.width(), previousLine);
932 elideStart = previousLine.textStart();
935 height = previousHeight;
939 const bool isLastLine = line.textStart() + line.textLength() >= layoutText.size();
941 if (singlelineElide && visibleCount == 1 && line.naturalTextWidth() > line.width()) {
944 widthExceeded =
true;
949 elideText = layout.engine()->elidedText(
950 Qt::TextElideMode(elideMode),
951 QFixed::fromReal(line.width()),
955 elideStart = line.textStart();
956 elideEnd = elideStart + line.textLength();
959 height = naturalHeight;
963 const bool wrappedLine = layoutText.at(line.textStart() + line.textLength() - 1) != QChar::LineSeparator;
964 wrapped |= wrappedLine;
967 ++unwrappedLineCount;
970 if (visibleCount == maxLineCount) {
972 heightExceeded |= wrapped;
974 if (multilineElide) {
979 const QTextLine nextLine = layout.createLine();
980 elideText = wrappedLine
981 ? elidedText(line.width(), line, &nextLine)
982 : elidedText(line.width(), line);
983 elideStart = line.textStart();
987 height = naturalHeight;
993 previousHeight = height;
994 height = naturalHeight;
996 widthExceeded |= wrapped;
1004 if ((requireImplicitSize) && line.isValid() && unwrappedLineCount < maxLineCount) {
1007 for (
int lineCount = layout.lineCount(); lineCount < maxLineCount; ++lineCount) {
1008 line = layout.createLine();
1009 if (!line.isValid())
1011 if (layoutText.at(line.textStart() - 1) == QChar::LineSeparator)
1012 ++unwrappedLineCount;
1013 setLineGeometry(line, lineWidth, naturalHeight);
1018 const int eol = line.isValid()
1019 ? line.textStart() + line.textLength()
1020 : layoutText.size();
1021 if (eol < layoutText.size() && layoutText.at(eol) != QChar::LineSeparator)
1022 line = layout.createLine();
1023 for (; line.isValid() && unwrappedLineCount <= maxLineCount; ++unwrappedLineCount)
1024 line = layout.createLine();
1028 const qreal naturalWidth = layout.maximumWidth();
1030 bool wasInLayout = internalWidthUpdate;
1031 internalWidthUpdate =
true;
1032 q->setImplicitSize(naturalWidth + q->leftPadding() + q->rightPadding(), naturalHeight + qMax(lineHeightOffset(), 0) + q->topPadding() + q->bottomPadding());
1033 internalWidthUpdate = wasInLayout;
1036 singlelineElide = elideMode != QQuickText::ElideNone && q->widthValid();
1037 multilineElide = elideMode == QQuickText::ElideRight
1039 && (q->heightValid() || maximumLineCountValid);
1040 canWrap = wrapMode != QQuickText::NoWrap && q->widthValid();
1042 horizontalFit = fontSizeMode() & QQuickText::HorizontalFit && q->widthValid();
1043 verticalFit = fontSizeMode() & QQuickText::VerticalFit
1044 && (q->heightValid() || (maximumLineCountValid && canWrap));
1046 const qreal oldWidth = lineWidth;
1047 const qreal oldHeight = maxHeight;
1049 const qreal availWidth = availableWidth();
1050 const qreal availHeight = availableHeight();
1052 lineWidth = q->widthValid() && q->width() > 0 ? availWidth : naturalWidth;
1053 maxHeight = q->heightValid() ? availHeight : FLT_MAX;
1057 if ((!qFuzzyCompare(lineWidth, oldWidth) || (widthExceeded && lineWidth > oldWidth))
1058 && (singlelineElide || multilineElide || canWrap || horizontalFit
1059 || q->effectiveHAlign() != QQuickText::AlignLeft)) {
1060 widthChanged =
true;
1061 widthExceeded = lineWidth >= qMin(oldWidth, naturalWidth);
1062 heightExceeded =
false;
1068 if ((maxHeight < qMin(oldHeight, naturalHeight) || (heightExceeded && maxHeight > oldHeight))
1069 && (multilineElide || (canWrap && maximumLineCountValid))) {
1070 widthExceeded =
false;
1071 heightExceeded =
false;
1077 if (!q->widthValid() && !implicitWidthValid && unwrappedLineCount > 1 && q->effectiveHAlign() != QQuickText::AlignLeft) {
1078 widthExceeded =
false;
1079 heightExceeded =
false;
1082 }
else if (widthChanged) {
1083 widthChanged =
false;
1084 if (line.isValid()) {
1085 for (
int lineCount = layout.lineCount(); lineCount < maxLineCount; ++lineCount) {
1086 line = layout.createLine();
1087 if (!line.isValid())
1089 setLineGeometry(line, lineWidth, naturalHeight);
1094 bool wasInLayout = internalWidthUpdate;
1095 internalWidthUpdate =
true;
1096 q->setImplicitHeight(naturalHeight + qMax(lineHeightOffset(), 0) + q->topPadding() + q->bottomPadding());
1097 internalWidthUpdate = wasInLayout;
1099 multilineElide = elideMode == QQuickText::ElideRight
1101 && (q->heightValid() || maximumLineCountValid);
1102 verticalFit = fontSizeMode() & QQuickText::VerticalFit
1103 && (q->heightValid() || (maximumLineCountValid && canWrap));
1105 const qreal oldHeight = maxHeight;
1106 maxHeight = q->heightValid() ? availableHeight() : FLT_MAX;
1109 if ((maxHeight < qMin(oldHeight, naturalHeight) || (heightExceeded && maxHeight > oldHeight))
1110 && (multilineElide || (canWrap && maximumLineCountValid))) {
1111 widthExceeded =
false;
1112 heightExceeded =
false;
1121 if (eos != -1 && elide) {
1122 int start = eos + 1;
1123 eos = text.indexOf(QLatin1Char(
'\x9c'), start);
1124 layoutText = text.mid(start, eos != -1 ? eos - start : -1);
1125 layoutText.replace(QLatin1Char(
'\n'), QChar::LineSeparator);
1126 layout.setText(layoutText);
1127 textHasChanged =
true;
1134 if (layout.lineCount() > 0) {
1135 QTextLine firstLine = layout.lineAt(0);
1136 QTextLine lastLine = layout.lineAt(layout.lineCount() - 1);
1137 advance = QSizeF(lastLine.horizontalAdvance(),
1138 lastLine.y() - firstLine.y());
1143 if (!horizontalFit && !verticalFit)
1147 if (qFuzzyCompare(smallFont, largeFont))
1151 if (horizontalFit) {
1152 if (unelidedRect.width() > lineWidth || (!verticalFit && wrapped)) {
1153 widthExceeded =
true;
1154 largeFont = scaledFontSize;
1156 scaledFontSize = (smallFont + largeFont) / 2;
1159 }
else if (!verticalFit) {
1160 smallFont = scaledFontSize;
1163 if ((largeFont - smallFont) < sizeFittingThreshold)
1166 scaledFontSize = (smallFont + largeFont) / 2;
1171 if (truncateHeight || unelidedRect.height() > maxHeight) {
1172 heightExceeded =
true;
1173 largeFont = scaledFontSize;
1175 scaledFontSize = (smallFont + largeFont) / 2;
1178 smallFont = scaledFontSize;
1181 if ((largeFont - smallFont) < sizeFittingThreshold)
1184 scaledFontSize = (smallFont + largeFont) / 2;
1189 implicitWidthValid =
true;
1190 implicitHeightValid =
true;
1192 QFontInfo scaledFontInfo(scaledFont);
1193 if (fontInfo.weight() != scaledFontInfo.weight()
1194 || fontInfo.pixelSize() != scaledFontInfo.pixelSize()
1195 || fontInfo.italic() != scaledFontInfo.italic()
1196 || !qFuzzyCompare(fontInfo.pointSizeF(), scaledFontInfo.pointSizeF())
1197 || fontInfo.family() != scaledFontInfo.family()
1198 || fontInfo.styleName() != scaledFontInfo.styleName()) {
1199 fontInfo = scaledFontInfo;
1200 emit q->fontInfoChanged();
1203 if (eos != multilengthEos)
1206 assignedFont = QFontInfo(font).family();
1210 elideLayout.reset(
new QTextLayout);
1211 elideLayout->setCacheEnabled(
true);
1213 QTextEngine *engine = layout.engine();
1214 if (engine && engine->hasFormats()) {
1215 QVector<QTextLayout::FormatRange> formats;
1216 switch (elideMode) {
1217 case QQuickText::ElideRight:
1218 elideFormats(elideStart, elideText.size() - 1, 0, &formats);
1220 case QQuickText::ElideLeft:
1221 elideFormats(elideEnd - elideText.size() + 1, elideText.size() - 1, 1, &formats);
1223 case QQuickText::ElideMiddle: {
1224 const int index = elideText.indexOf(elideChar);
1226 elideFormats(elideStart, index, 0, &formats);
1228 elideEnd - elideText.size() + index + 1,
1229 elideText.size() - index - 1,
1238 elideLayout->setFormats(formats);
1241 elideLayout->setFont(layout.font());
1242 elideLayout->setTextOption(layout.textOption());
1243 elideLayout->setText(elideText);
1244 elideLayout->beginLayout();
1246 QTextLine elidedLine = elideLayout->createLine();
1247 elidedLine.setPosition(QPointF(0, height));
1249 setupCustomLineGeometry(elidedLine, height, elideText.size(), visibleCount - 1);
1251 setLineGeometry(elidedLine, lineWidth, height);
1253 elideLayout->endLayout();
1255 br = br.united(elidedLine.naturalTextRect());
1257 if (visibleCount == 1)
1258 layout.clearLayout();
1260 elideLayout.reset();
1263 QTextLine firstLine = visibleCount == 1 && elideLayout
1264 ? elideLayout->lineAt(0)
1266 if (firstLine.isValid())
1267 *baseline = firstLine.y() + firstLine.ascent();
1270 br.setHeight(height);
1273 if (lineCount != visibleCount) {
1274 lineCount = visibleCount;
1275 emit q->lineCountChanged();
1278 if (truncated != wasTruncated)
1279 emit q->truncatedChanged();
1284void QQuickTextPrivate::setLineGeometry(QTextLine &line, qreal lineWidth, qreal &height)
1287 line.setLineWidth(lineWidth);
1289 if (extra.isAllocated() && extra->imgTags.isEmpty()) {
1290 line.setPosition(QPointF(line.position().x(), height));
1291 height += (lineHeightMode() == QQuickText::FixedHeight) ? lineHeight() : line.height() * lineHeight();
1296 qreal textHeight = line.height();
1297 qreal totalLineHeight = textHeight;
1299 QList<QQuickStyledTextImgTag *> imagesInLine;
1301 if (extra.isAllocated()) {
1302 for (QQuickStyledTextImgTag *image : std::as_const(extra->imgTags)) {
1303 if (image->position >= line.textStart() &&
1304 image->position < line.textStart() + line.textLength()) {
1307 const QQmlContext *context = qmlContext(q);
1308 const QUrl url = context->resolvedUrl(q->baseUrl()).resolved(image->url);
1309 image->pix.reset(
new QQuickPixmap(context->engine(), url, QRect(), image->size * effectiveDevicePixelRatio()));
1311 if (image->pix->isLoading()) {
1312 image->pix->connectFinished(q, SLOT(imageDownloadFinished()));
1313 }
else if (image->pix->isReady()) {
1314 if (!image->size.isValid()) {
1315 image->size = image->pix->implicitSize();
1318 needToUpdateLayout =
true;
1320 }
else if (image->pix->isError()) {
1321 qmlWarning(q) << image->pix->error();
1325 qreal ih = qreal(image->size.height());
1326 if (image->align == QQuickStyledTextImgTag::Top)
1328 else if (image->align == QQuickStyledTextImgTag::Middle)
1329 image->pos.setY((textHeight / 2.0) - (ih / 2.0));
1331 image->pos.setY(textHeight - ih);
1332 imagesInLine << image;
1333 textTop = qMax(textTop, qAbs(image->pos.y()));
1338 for (QQuickStyledTextImgTag *image : std::as_const(imagesInLine)) {
1339 totalLineHeight = qMax(totalLineHeight, textTop + image->pos.y() + image->size.height());
1340 const int leadX = line.cursorToX(image->position);
1341 const int trailX = line.cursorToX(image->position, QTextLine::Trailing);
1342 const bool rtl = trailX < leadX;
1343 image->pos.setX(leadX + (rtl ? (-image->offset - image->size.width()) : image->offset));
1344 image->pos.setY(image->pos.y() + height + textTop);
1345 extra->visibleImgTags << image;
1348 line.setPosition(QPointF(line.position().x(), height + textTop));
1349 height += (lineHeightMode() == QQuickText::FixedHeight) ? lineHeight() : totalLineHeight * lineHeight();
2774QSGNode *QQuickText::updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data)
2779 if (d->text.isEmpty()) {
2780 d->containsUnscalableGlyphs =
false;
2785 if (d->updateType != QQuickTextPrivate::UpdatePaintNode && oldNode !=
nullptr) {
2787 d->updateType = QQuickTextPrivate::UpdateNone;
2791 d->updateType = QQuickTextPrivate::UpdateNone;
2793 const qreal dy = QQuickTextUtil::alignedY(d->layedOutTextRect.height() + d->lineHeightOffset(), d->availableHeight(), d->vAlign) + topPadding();
2795 QSGInternalTextNode *node =
nullptr;
2797 node = d->sceneGraphContext()->createInternalTextNode(d->sceneGraphRenderContext());
2799 node =
static_cast<QSGInternalTextNode *>(oldNode);
2801 node->setFiltering(smooth() ? QSGTexture::Linear : QSGTexture::Nearest);
2803 node->setTextStyle(QSGTextNode::TextStyle(d->style));
2804 node->setRenderType(QSGTextNode::RenderType(d->renderType));
2805 node->setRenderTypeQuality(d->renderTypeQuality());
2807 node->setMatrix(QMatrix4x4());
2809 node->setColor(QColor::fromRgba(d->color));
2810 node->setStyleColor(QColor::fromRgba(d->styleColor));
2811 node->setLinkColor(QColor::fromRgba(d->linkColor));
2813 node->setDevicePixelRatio(d->effectiveDevicePixelRatio());
2816 node->setViewport(clipRect());
2817 const qreal dx = QQuickTextUtil::alignedX(d->layedOutTextRect.width(), d->availableWidth(), effectiveHAlign()) + leftPadding();
2819 node->addTextDocument(QPointF(dx, dy), d->extra->doc);
2820 }
else if (d->layedOutTextRect.width() > 0) {
2821 if (flags().testFlag(ItemObservesViewport))
2822 node->setViewport(clipRect());
2824 node->setViewport(QRectF{});
2825 const qreal dx = QQuickTextUtil::alignedX(d->lineWidth, d->availableWidth(), effectiveHAlign()) + leftPadding();
2826 int unelidedLineCount = d->lineCount;
2828 unelidedLineCount -= 1;
2829 if (unelidedLineCount > 0)
2830 node->addTextLayout(QPointF(dx, dy), &d->layout, -1, -1,0, unelidedLineCount);
2833 node->addTextLayout(QPointF(dx, dy), d->elideLayout.get());
2835 if (d->extra.isAllocated()) {
2836 for (QQuickStyledTextImgTag *img : std::as_const(d->extra->visibleImgTags)) {
2837 if (img->pix && img->pix->isReady())
2838 node->addImage(QRectF(img->pos.x() + dx, img->pos.y() + dy, img->size.width(), img->size.height()), img->pix->image());
2843 d->containsUnscalableGlyphs = node->containsUnscalableGlyphs();
2847 invalidateFontCaches();