setImplicitWidth/setImplicitHeight are used wrong. They are set to a hardcoded size wile instead they should reflect the real size of the loaded content.
In case of an image, they should reflect the actual pixel size of the loaded image, while for generated rectangles, it should match the set widht/height.
setImplicitWidt h/setImplicitHe ight are used wrong. They are set to a hardcoded size wile instead they should reflect the real size of the loaded content.
In case of an image, they should reflect the actual pixel size of the loaded image, while for generated rectangles, it should match the set widht/height.