Redoing splashscreen code
This commit is contained in:
parent
f8dfcf799c
commit
62c058f645
|
@ -1,8 +1,12 @@
|
|||
#! /usr/bin/env python3
|
||||
"""
|
||||
"""
|
||||
|
||||
import sys
|
||||
import PyQt5
|
||||
from PyQt5.QtCore import Qt, QDateTime, QObject, pyqtSignal
|
||||
from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QAbstractItemView, QTableWidgetItem, QSplashScreen
|
||||
from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QAbstractItemView, \
|
||||
QTableWidgetItem, QSplashScreen, QProgressBar
|
||||
from PyQt5.QtGui import QStandardItemModel, QPixmap
|
||||
from MuleAnalyzerUI import Ui_MainWindow
|
||||
|
||||
|
@ -48,6 +52,7 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
)
|
||||
|
||||
def __init__(self):
|
||||
self.is_loading = False
|
||||
super(MainWindow, self).__init__()
|
||||
self.setupUi(self)
|
||||
|
||||
|
@ -66,7 +71,12 @@ class MainWindow(QMainWindow, Ui_MainWindow):
|
|||
self.actionExit.triggered.connect(self.close)
|
||||
|
||||
# Init functionality and other features
|
||||
self.hashsets = load_hashsets('Hashsets')
|
||||
self.hashsets = load_hashsets('Hashsets', self.cb_print_msg)
|
||||
self.is_loading = True
|
||||
|
||||
def cb_print_msg(self, message):
|
||||
PyQt5.QtWidgets.QApplication.processEvents()
|
||||
print('>>>', message)
|
||||
|
||||
def createED2KModel(self, parent):
|
||||
model = QStandardItemModel(0, len(self.Headers), parent)
|
||||
|
@ -133,9 +143,11 @@ def main(argv):
|
|||
splash_pix = QPixmap('splash-screen.jpg')
|
||||
splash_screen = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint)
|
||||
splash_screen.setMask(splash_pix.mask())
|
||||
splash_screen.show()
|
||||
app.processEvents()
|
||||
|
||||
splash_screen.show()
|
||||
splash_screen.showMessage('<h1>EY // eMuleAnalyzer</h1>', Qt.AlignTop | Qt.AlignCenter, Qt.black)
|
||||
|
||||
app.processEvents()
|
||||
window = MainWindow()
|
||||
window.show()
|
||||
splash_screen.finish(window)
|
||||
|
|
Loading…
Reference in New Issue