Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.15.1
-
None
-
Windows
Description
This worked correctly in version 5.13.2, and does not work correctly in version 5.15:
class BSqlQueryModel(QSqlQueryModel): ... def data(self, index, role = Qt.DisplayRole): if index.column() == self.image_column: ... elif (role == Qt.ToolTipRole): html = (" <table> <tr> <td><img src="T802326143217.jpg" height="500"></td> <td><img src="T802326143217-b.jpg" height="500"></td> </tr> </table> ") return html
Sorry for python code (I work in PyQt), but it's evident.
In version 5.13.2 when tooltip is displayed, width is ok for both pictures. In other words, Qt itself computes and displays the right width (not necessarily the same) for both pictures, 500x400 for first image and 500x300 for second. In version 5.15 Qt displays (for example) 500x100 for first image and 500x100 for second image, so it incorrectly computes the width and both images are displayed cropped (useless for the user).
The original dimensions of the images are 1000x800 and 1000x600.
So, I am now stuck with version 5.13.2.
Edit: the code is more complex, for example I previously define filename depending on index row and column 3 ("T802326143217") and use:
... img_ = '<img src="' + filename + '" height="' + multi_image_height + '">' img_b = '<img src="' + filename_b + '" height="' + multi_image_height + '">' html = '<table><tr><td>' + img_ + '</td><td>' + img_b + '</td></tr></table>' return html
...and the same for other pictures: filename_b,...
Attachments
Issue Links
- resulted from
-
QTBUG-77337 Unbounded recursion in QQuickGridLayoutBase::rearrange leading to stack exhaustion and 100% reproducible crash (segfault)
- Closed