anyone help me please? # test_icon.py
import sys
from PySide6.QtWidgets import QApplication, QLabel, QVBoxLayout, QWidget
from PySide6.QtGui import QPixmap
from qss_style import resources_rc # Import the compiled resources
# <!-- clean/qss_style/resources.qrc -->
# <RCC>
# <qresource prefix="/icons">
# <file>icons/drop_down.png</file>
# <!-- Add more icon files here if needed -->
# </qresource>
# <qresource prefix="/styles">
# <file>style.qss</file>
# </qresource>
# </RCC>
#-- Command---#
# pyside6-rcc resources.qrc -o resources_rc.py
def main():
app = QApplication(sys.argv)
window = QWidget()
layout = QVBoxLayout()
label = QLabel()
pixmap = QPixmap(":/icons/drop_down.png")
if pixmap.isNull():
print("Failed to load icon: :/icons/drop_down.png")
label.setText("Icon Failed to Load")
else:
print("Successfully loaded icon: :/icons/drop_down.png")
label.setPixmap(pixmap.scaled(16, 16)) # Adjust size as needed
layout.addWidget(label)
window.setLayout(layout)
window.show()
sys.exit(app.exec())
if __name__ == "__main__":
main()
icon not working or showing, please download an image online and use it to test for me and fix for me
1 January 2025