hello everyone i have made a pyqt5 script and its working very well no i have added the splash screen for my project and the error i am having is that the whole app crashes and doesn't execute except the splash screen. class parameter
class Ui_LOGINpAGE(QObject):
def __init__(self):
super(Ui_LOGINpAGE, self).__init__()
def setupUi(self, LOGINpAGE):
LOGINpAGE.setObjectName("LOGINpAGE")
'''''''''''''''''
'''''''''''''
''''''''
''''''''''
codes which i am using are for splash screen
if __name__ == "__main__":
import sys, time
app = QApplication(sys.argv)
# Create and display the splash screen
splash_pix = QPixmap('img/logo.png')
splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint)
splash.setWindowFlags(Qt.WindowStaysOnTopHint | Qt.FramelessWindowHint)
splash.setEnabled(False)
# splash = QSplashScreen(splash_pix)
# adding progress bar
progressBar = QProgressBar(splash)
progressBar.setMaximum(10)
progressBar.setGeometry(0, splash_pix.height() - 50, splash_pix.width(), 20)
# splash.setMask(splash_pix.mask())
splash.show()
splash.showMessage("<h1><font color='green'>Welcome BeeMan!</font></h1>", Qt.AlignTop | Qt.AlignCenter, Qt.black)
for i in range(1, 11):
progressBar.setValue(i)
t = time.time()
while time.time() < t + 0.1:
app.processEvents()
# Simulate something that takes time
time.sleep(5)
import sys
app = QtWidgets.QApplication(sys.argv)
LOGINpAGE = QtWidgets.QMainWindow()
ui = Ui_LOGINpAGE()
ui.setupUi(LOGINpAGE)
print(Ui_LOGINpAGE.__dict__)
splash.finish(LOGINpAGE.show())
sys.exit(app.exec_())
the error i am getting are as followes:
Process finished with exit code -1073741819 (0xC0000005)
User contributions licensed under CC BY-SA 3.0