I have a bunch of WebEngineViews in a ListView. For example:

Qt Code:
  1. ListView
  2. {
  3. model: myModel
  4. delegate: Component
  5. {
  6. Item
  7. {
  8. WebEngineView
  9. {
  10. id: myWebView
  11. Component.onCompleted: loadHtml(model.modelData.htmlText, baseURL)
  12. }
  13. }
  14. }
  15. }
To copy to clipboard, switch view to plain text mode 

How can I adjust the height of the Item once the html is loaded? The HTML in question may include images, so I want to resize the WebEngineView once everything is loaded. I suspect I can do something like:

Qt Code:
  1. ListView
  2. {
  3. model: myModel
  4. delegate: Component
  5. {
  6. Item
  7. {
  8. WebEngineView
  9. {
  10. id: myWebView
  11. Component.onCompleted: loadHtml(model.modelData.htmlText, baseURL)
  12. onLoadingChanged:
  13. {
  14. if (!loading && loadRequest.status == WebEngineView.LoadSucceededStatus)
  15. {
  16. height = ????
  17. }
  18. }
  19. }
  20. }
  21. }
  22. }
To copy to clipboard, switch view to plain text mode 

But I'm not sure to what I should set height.