QPixmaps and QIcons not Showing for some Users on PySide6
-
I have a bit of a weird issue on my PySide6 application. I have some QPixmaps and QIcons and they work fine for me and several people that already tried it out, but for one specific user no image shows up, neither the Pixmaps nor the Icons.
This happens both when using a resource file and the files directly. We have already tried both running it with Admin privileges and without, but the result didn't change. For the icons, no error message is displayed. For the Pixmaps, an error messages says the "QImage is null", when constructing the object.
The minimum reproducible code for this would be:
import sys from PySide6 import QtGui, QtWidgets import resources_pyside6 def main(): app = QtWidgets.QApplication(sys.argv) window = QtWidgets.QWidget() window.show() # create label logo_label = QtWidgets.QLabel() img = QtGui.QImage(":/logos/logo_black.svg") pixmap = QtGui.QPixmap(img) logo_label.setPixmap(pixmap) # create layout layout = QtWidgets.QVBoxLayout(window) layout.addWidget(logo_label) window.setLayout(layout) app.exec() if __name__ == "__main__": main()The user in question is on Windows 10, with Python 3.12 and the newest PySide6 version from pip.
Any help would be appreciated!
-
They are most likely missing the qsvgicon iconengine plugin.