You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 1) QTreeWidget is not able to scroll continuously through the content of large widgets// iserted into items via setItemWidget, it always jumps to the top of next item
93
-
// and it is not able to scroll to the bottom of an inserted large widget (until
94
-
// the QTreeWidget itself is large enough to show the whole inserted widget).
95
-
// => We have to keep the height of QgsWebView smaller than the height of QTreeWidget
96
-
// so that a user can see it entire, even if this height is smaller than QgsWebView
97
-
// content (i.e. QgsWebView scroolbar is added). We make it even a bit smaller so
98
-
// that a user can see a bit of context (items above/below) when scrolling which
99
-
// is more pleasant.
92
+
// 1) QTreeWidget is not able to scroll continuously through the content of large widgets
93
+
// inserted into items via setItemWidget, it always jumps to the top of next
94
+
// item and it is not able to scroll to the bottom of an inserted large
95
+
// widget (until the QTreeWidget itself is large enough to show the whole
96
+
// inserted widget). => We have to keep the height of QgsWebView smaller
97
+
// than the height of QTreeWidget so that a user can see it entire, even if
98
+
// this height is smaller than QgsWebView content (i.e. QgsWebView scroolbar
99
+
// is added). We make it even a bit smaller so that a user can see a bit of
100
+
// context (items above/below) when scrolling which is more pleasant.
100
101
//
101
-
// 2) contentsSize() is 0,0 until a page is loaded. If there are no external resources
102
-
// (like images) used, contentsSize() is available immediately after setHtml(),
103
-
// otherwise the contentSize() is 0,0 until the page is loaded and contentsSizeChanged ()
104
-
// is emited.
102
+
// 2) contentsSize() is 0,0 until a page is loaded. If there are no external
103
+
// resources (like images) used, contentsSize() is available immediately
104
+
// after setHtml(), otherwise the contentSize() is 0,0 until the page is
105
+
// loaded and contentsSizeChanged () is emited.
105
106
//
106
-
// 3) If QgsWebView is resized (on page load) after it was inserted into QTreeWidget,
107
-
// the row does not reflect that change automaticaly and consecutive resize
108
-
// of QTreeWidget will cause to shrink QgsWebView to the original row height.
109
-
// That is expected, Qt: "setItemWidget() should only be used to display static
110
-
// content...
111
-
//=> we must not change QgsWebView size after it was inserted to QTreeWidget
107
+
// 3) If QgsWebView is resized (on page load) after it was inserted into
108
+
// QTreeWidget, the row does not reflect that change automaticaly and
109
+
// consecutive resize of QTreeWidget will cause to shrink QgsWebView to the
110
+
// original row height. That is expected, Qt: "setItemWidget() should only
111
+
// be used to display static content... => we must not change QgsWebView
112
+
// size after it was inserted to QTreeWidget
112
113
113
114
// TODO(?): Sometimes it may happen that if multiple QgsWebView are inserted to
114
-
// QTreeWidget for the first time, and both share the same external source (image)
0 commit comments