Oh Snap!

Please turnoff your ad blocking mode for viewing your site content

Hit enter after type your search item

Python PyQt5 Loading Dialog Circular Spinner Progressbar GIF Animation GUI Desktop App Full Project For Beginners

/
/
/
8 Views

 

Welcome folks today in this post we will be building a loading bar circular spinner gif animation in pyqt5. All the full source code of the application is shown below.

 

 

Get Started

 

 

In order to get started you need to install the following library using the pip command as shown below

 

pip install pyqt5

 

After installing this library make an app.py file and copy paste the following code

 

app.py

 

import sys 
from PyQt5 import QtCore, QtGui, QtWidgets 
from PyQt5.QtGui import QMovie 
from PyQt5.QtCore import Qt 
  
  
class LoadingGif(object): 
  
    def mainUI(self, FrontWindow): 
        FrontWindow.setObjectName("FTwindow") 
        FrontWindow.resize(320, 300) 
        self.centralwidget = QtWidgets.QWidget(FrontWindow) 
        self.centralwidget.setObjectName("main-widget") 
  
        # Label Create 
        self.label = QtWidgets.QLabel(self.centralwidget) 
        self.label.setGeometry(QtCore.QRect(25, 25, 200, 200)) 
        self.label.setMinimumSize(QtCore.QSize(250, 250)) 
        self.label.setMaximumSize(QtCore.QSize(250, 250)) 
        self.label.setObjectName("lb1") 
        FrontWindow.setCentralWidget(self.centralwidget) 
  
        # Loading the GIF 
        self.movie = QMovie("loader.gif") 
        self.label.asetMovie(self.movie) 
  
        self.startAnimation() 
  
    # Start Animation 
  
    def startAnimation(self): 
        self.movie.start() 
  
    # Stop Animation(According to need) 
    def stopAnimation(self): 
        self.movie.stop() 
  
  
app = QtWidgets.QApplication(sys.argv) 
window = QtWidgets.QMainWindow() 
demo = LoadingGif() 
demo.mainUI(window) 
window.show() 
sys.exit(app.exec_())

 

READ  Python 3 Script to Find Factorial of Number Using Recursion Method Full Tutorial For Beginners

 

Now if you execute the python script by typing the below command as shown below

 

python app.py

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

This div height required for enabling the sticky sidebar
Coding Shiksha 2020. All Rights Reserved.
Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views : Ad Clicks : Ad Views :