Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pyqt loading screen

if __name__ == "__main__":
    app = QApplication([])
    # Create splashscreen
    splash_pix = QtGui.QPixmap('icons/Image.png')
    splash = QtGui.QSplashScreen(splash_pix, QtCore.Qt.WindowStaysOnTopHint)
    widget = Main()
    # add fade to splashscreen 
    opaqueness = 0.0
    step = 0.06
    splash.setWindowOpacity(opaqueness)
    splash.show()
    while opaqueness < 1:
        splash.setWindowOpacity(opaqueness)
        time.sleep(step) # Gradually appears
        opaqueness+=step
    time.sleep(1.2)
    splash.close()

    # Run the normal application
    widget.show()
    app.exec_()
Comment

PREVIOUS NEXT
Code Example
Python :: python hello world web application 
Python :: how to keep a webdriver tab open 
Python :: python check if exe is running 
Python :: array length godot 
Python :: Creating a list with list comprehensions 
Python :: python zip extract directory 
Python :: current time python 
Python :: python get duration of wav file 
Python :: how to do http requetss python 
Python :: how to shutdown a windows 10 computer using python 
Python :: map object to array python 
Python :: python set recursion limit 
Python :: python csv dict reader 
Python :: how to print to a file in python 
Python :: install pip with pacman linux 
Python :: dataframe get row by name 
Python :: django redirect to external url 
Python :: replace newline character in python 
Python :: python get position of character in string 
Python :: python print for loop one line 
Python :: kfold cross validation sklearn 
Python :: new window selenium python 
Python :: convert string to utf8 python 
Python :: python 3.9 features 
Python :: print str and float python 
Python :: decorator python 
Python :: flatten numpy array 
Python :: How to convert simple string in to camel case in python 
Python :: how to remove stop words in python 
Python :: AttributeError: __enter__ python 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =