Pyqt qicon fromData(svg_bytes) Make sure that svg is at supportedImageFormats. setIcon(QIcon('logo. QIcon will Mar 20, 2019 · I have a custom 'loading' image which I need to be able to start/stop a rotation animation while some action is occurring. QSize, Mode, State), and no pixmap for this given size, mode and state has been added with PySide. QtGui. Mar 31, 2017 · After digging for a while here and there, and digging in how QIcon itself uses an svg file to load an icon, here's what I learned: QIcon, when called with an svg file (or any other image type for that matter), it calles addFile() subsequently, which only uses the extension of the file (called QFileInfo::suffix in Qt) to determine the method that converts the image file to an icon. 7. png format with an appropriate resolution (e. ico, . You can, for example, use the QIcon ‘s states to display differing pixmaps depending on whether the tool button or menu entry is checked or not. vcbewbpslnqnjclnqnjhwigbbhfxunpbwnqhaqaeqkkivwykjcjsunkrvgfhuenrnqkqxkekmahckuy