from PySide2.QtWidgets import QApplication, QStatusBar, QMainWindow
import sys
from PySide2.QtGui import QIcon
class Window(QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("Rakshit_Coding()")
self.setGeometry(350,200,480,420)
#Setting GUI window icon
icon = QIcon("icon.ico")
self.setWindowIcon(icon)
self.createStausbar()
def createStausbar(self):
self.statusbar = QStatusBar()
self.statusbar.showMessage("Hello Guys, It's a statusbar",2000)
#2000 milisecond = 2 second
self.setStatusBar(self.statusbar)
if __name__ == "__main__":
win_app = QApplication(sys.argv)
window = Window()
window.show()
win_app.exec_()
sys.exit(0)
Comments
Post a Comment
If you've any doubts, please let me text