[ Pyside ] Not able to get images to work as ToolTip for QPushButton.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have a grid of QPushButton that displays an image as their thumbnail icon. This is working correctly and behaves the way that I expect.
The issue is that since the size of the button is small, the image is not very clear(the thumbnail image is 200*200). So in order for the user to see what the thumbnail looks like in detail, I am using the ToolTip option where I am displaying a larger image(1024*1024) for better visibility.
I have a Maya version of the same tool that is working and displays the tooltip image as expected. But for some reason, the tooltip fails to load the image on the max side. It only displays an empty tooltip popup with nothing in it. I have tried replacing the image with a string and that works. It's just that Max fails to load the image when used as a ToolTip.
Heres my code:
self.fullImage = "path\\to\\image.jpg"
self.btn.setToolTip('<img src="{}">'.format(self.fullImage))