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
{{ message }}
Repository navigation
[Bug]: png icon image fails to load for manually defined tool buttons #22131
Yeah, your are correct. Your fix is clearly better than using isNull (except for the case that *_large.png exists, but is not a valid png, but nothing I had in mind when suggesting it.)
Activity
oscargus commentedon Jan 6, 2022
Should be possible to use
isNullto check if theQPixMapexists and if not use the original file name.https://doc.qt.io/qtforpython-5/PySide2/QtGui/QPixmap.html#PySide2.QtGui.PySide2.QtGui.QPixmap.isNull
timhoffm commentedon Jan 6, 2022
Thanks for the hint! It's even easier to check the file existence directly in python.
oscargus commentedon Jan 7, 2022
Yeah, your are correct. Your fix is clearly better than using
isNull(except for the case that*_large.pngexists, but is not a valid png, but nothing I had in mind when suggesting it.)