+ bool clipAdditionalInfoBounds = false;
+ if (m_layout == DetailsLayout) {
+ // Prevent a possible overlapping of the additional-information texts
+ // with the icon. This can happen if the user has minimized the width
+ // of the name-column to a very small value.
+ const qreal minX = m_pixmapPos.x() + m_pixmap.width() + 4 * itemListStyleOption.margin;
+ if (m_textPos[Name + 1].x() < minX) {
+ clipAdditionalInfoBounds = true;
+ painter->save();
+ painter->setClipRect(minX, 0, size().width() - minX, size().height(), Qt::IntersectClip);
+ }
+ }
+