Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. QPixmaps and QIcons not Showing for some Users on PySide6
Qt 6.11 is out! See what's new in the release blog

QPixmaps and QIcons not Showing for some Users on PySide6

Scheduled Pinned Locked Moved Unsolved Qt for Python
2 Posts 2 Posters 952 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    joao_dgg
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      They are most likely missing the qsvgicon iconengine plugin.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved