def initUI(): app = QApplication(sys.argv) # Set up the Organization, Domain and App names to be used for QSettings. app.setOrganizationName("feedIO project") app.setOrganizationDomain("feedio.org") app.setApplicationName("feedIO") # #add following 3 lines to enable sinhala # translator = QTranslator(app) # translator.load("UI/feedio_sinhala") # app.installTranslator(translator) #Splash screen implementation splash_pix = QPixmap(":/images/splash.png") # splash_pix = QPixmap('./images/feedIO-splash.png') splash = QSplashScreen(splash_pix, Qt.WindowStaysOnTopHint) splash.setMask(splash_pix.mask()) splash.show() app.processEvents() # time.sleep(2) # create a feedIO QWidget instance feedIO = FeedIO() # pass feedIO as the parent for the mainWindow. mainWindow = mainUI(feedIO) # system tray icon icon = QIcon() icon.addPixmap(QPixmap(":/images/feedIO.png"), QIcon.Normal, QIcon.Off) # Pass the feedIO instance as the parent and the mainWindow instance as the child. trayIcon = SystemTrayIcon(icon, feedIO, mainWindow) #tool tip for the system try icon. # TODO this should be updated appropriately at run time. trayIcon.setToolTip("feedIO " + __version__ + " developer build running...") trayIcon.show() mainWindow.show() splash.finish(mainWindow) sys.exit(app.exec_())