diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index ff0c035a90..1cc891ed5a 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -2366,10 +2366,10 @@ QTextLayoutStruct QTextDocumentLayoutPrivate::layoutCell(QTextTable *t, const QT floatMinWidth = qMax(floatMinWidth, cd->minimumWidth); } - // constraint the maximumWidth by the minimum width of the fixed size floats, to - // keep them visible + // constraint the maximum/minimumWidth by the minimum width of the fixed size floats, + // to keep them visible layoutStruct.maximumWidth = qMax(layoutStruct.maximumWidth, floatMinWidth); - layoutStruct.minimumWidth = floatMinWidth; + layoutStruct.minimumWidth = qMax(layoutStruct.minimumWidth, floatMinWidth); // as floats in cells get added to the table's float list but must not affect // floats in other cells we must clear the list here.