Created
July 8, 2025 13:51
-
-
Save Pymmdrza/c01d123dd66e71d14f1dd2e4e7a4c71c to your computer and use it in GitHub Desktop.
All default icon PyQt6 for use free
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Author
Pymmdrza
commented
Jul 8, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment