Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-86671

Table cells overlap with image and relative width

    XMLWordPrintable

Details

    • All
    • 97cfd4940157817dd761fd02f2e6da4afc5b4a30 (qt/qtbase/dev) d2c02eec71ebe0f392c68cae7558412c492a4460 (qt/qtbase/6.2) 71cca7d2c29cea0e60403f7cf28b5d659233d914 (qt/tqtc-qtbase/5.15)

    Description

      Since Qt 5.15.1, the following table renders incorrectly. This got broken by https://codereview.qt-project.org/c/qt/qtbase/+/300974 as a git bisect showed.

      #include <QApplication>
      #include <QTextBrowser>
      
      int main(int argc, char *argv[])
      {
      	QApplication app(argc, argv);
      	QTextBrowser browser;
              browser.setHtml("<table><tr><td>"
                  "<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEUAAAD///+l2Z/dAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAE0lEQVQI12NgAIH6////DT4CBACNTWhrz7iOhgAAAABJRU5ErkJggg=='/>"
                  "</td><td style='background-color: grey' width='100%'>asdf</td></tr></table>");
      	browser.show();
              return app.exec();
      }
      

      Specifying style='white-space: nowrap;' on the cell with the image works around the issue, so it seems like it's trying to word wrap the image?

      The attached screenshot shows the above application before the linked commit on the left and with the commit on the right.

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-86671
          # Subject Branch Project Status CR V

          Activity

            People

              vhilshei Volker Hilsheimer
              vogtinator Fabian Vogt
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: