from PySide2.QtWidgets import QApplication, QWidget
import sys
from PySide2.QtGui import QIcon
class Window(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("Rakshit_Coding()")
self.setGeometry(350,200,480,420)
self.setMinimumHeight(320)
self.setMinimumWidth(380)
self.setMaximumHeight(480)
self.setMaximumWidth(520)
#Calling setIcon method
self.setIcon()
def setIcon(self):
icon = QIcon("icon.ico")
self.setWindowIcon(icon)
if __name__ == "__main__":
app = QApplication(sys.argv)
window = Window()
window.show()
app.exec_()
sys.exit(0)
Comments
Post a Comment
If you've any doubts, please let me text