Hello,

I know this is a QT Forum and no specified PyQT / Python forum
But The problem I face maybe is "so easy" but I can't see the solution

I have this Python Code.

First I open an QMainWindow as Splash Screen, while I load the settings, customers, sales etc..

But When I close the Splash Screen, and open the Main Screen, the taskbar details disappeared!

This is the code:

Qt Code:
  1. from PyQt5.QtCore import *
  2. from PyQt5.QtWidgets import *
  3. from PyQt5.QtGui import *
  4. from PyQt5.uic import loadUiType
  5. import os
  6. import sys
  7. import time
  8.  
  9.  
  10.  
  11. class ThreadProgress(QThread):
  12. mysignal = pyqtSignal(int, str)
  13.  
  14. def __init__(self, parent=None):
  15. QThread.__init__(self, parent)
  16.  
  17. def run(self):
  18. i = 0
  19. while i < 102:
  20. time.sleep(0.02)
  21. self.mysignal.emit(i, "txt")
  22. i += 1
  23.  
  24.  
  25. FROM_SPLASH, _ = loadUiType(os.path.join(os.path.dirname(__file__), "splash.ui"))
  26. FROM_MAIN, _ = loadUiType(os.path.join(os.path.dirname(__file__), "mainwindow FRAME.ui"))
  27.  
  28.  
  29. class Main(QMainWindow, FROM_MAIN):
  30. def __init__(self, parent=None):
  31. super(Main, self).__init__(parent)
  32. self.setupUi(self)
  33.  
  34.  
  35. class Splash(QMainWindow, FROM_SPLASH):
  36. def __init__(self, parent=None):
  37. super(Splash, self).__init__(parent)
  38. QMainWindow.__init__(self)
  39. self.setupUi(self)
  40.  
  41. pixmap = QPixmap("splash_logo.png")
  42. self.splah_image.setPixmap(pixmap.scaled(350, 152))
  43.  
  44. progress = ThreadProgress(self)
  45. progress.mysignal.connect(self.progress)
  46. progress.start()
  47.  
  48. @pyqtSlot(int, str)
  49. def progress(self, i, txt):
  50. if i == 101:
  51. self.close()
  52. self.setStyleSheet("")
  53. main = Main(self)
  54. main.show()
  55. self.progressBar.setValue(i)
  56. self.SubText.setText(txt)
  57.  
  58.  
  59.  
  60. def main():
  61. app = QApplication(sys.argv)
  62. splash = Splash()
  63. splash.show()
  64.  
  65. app.exec_()
  66.  
  67.  
  68. if __name__ == '__main__':
  69. try:
  70. main()
  71. except Exception as why:
  72. print(why)
To copy to clipboard, switch view to plain text mode 

Can you suggest me a solution?

Thank you very much