Skip to content

Instantly share code, notes, and snippets.

@Pymmdrza
Created July 8, 2025 13:51
Show Gist options
  • Save Pymmdrza/c01d123dd66e71d14f1dd2e4e7a4c71c to your computer and use it in GitHub Desktop.
Save Pymmdrza/c01d123dd66e71d14f1dd2e4e7a4c71c to your computer and use it in GitHub Desktop.
All default icon PyQt6 for use free
import sys
from PyQt6.QtWidgets import QApplication, QGridLayout, QPushButton, QStyle, QWidget
class Window(QWidget):
def __init__(self):
super().__init__()
icons = sorted(
[attr for attr in dir(QStyle.StandardPixmap) if attr.startswith("SP_")]
)
layout = QGridLayout()
for n, name in enumerate(icons):
btn = QPushButton(name)
pixmapi = getattr(QStyle.StandardPixmap, name)
icon = self.style().standardIcon(pixmapi)
btn.setIcon(icon)
layout.addWidget(btn, int(n / 4), int(n % 4))
self.setLayout(layout)
app = QApplication(sys.argv)
w = Window()
w.show()
app.exec()
@Pymmdrza
Copy link
Author

Pymmdrza commented Jul 8, 2025

PyQt6_Default_icons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment