diff --git a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp index bc687ac3a21..946b96c0898 100644 --- a/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp +++ b/src/plugins/qmldesigner/components/formeditor/formeditoritem.cpp @@ -239,6 +239,9 @@ void FormEditorItem::paintBoundingRect(QPainter *painter) const || (QGraphicsItem::parentItem() == scene()->formLayerItem() && qFuzzyIsNull(m_borderWidth))) return; + if (boundingRect().width() < 8 || boundingRect().height() < 8) + return; + QPen pen; pen.setJoinStyle(Qt::MiterJoin); pen.setStyle(Qt::DotLine);