Search code examples
pythonpyqtmessagebox

PyQt: How to create a simple information at programm-start that shutdown automatically


for a pyqt-program I want to create a simple information message for the program-start. The key is, that it should disappear automatically after a few seconds.

I tried to use a singleshot, but it didn't work:

class MainProgramm(QMainWindow):
    def __init__(self, *args):
        QWidget.__init__(self, *args)
        QTimer.singleShot(60, self.EntryMessage) 
...

def EntryMessage(self):
        QMessageBox.information(self, "About","text") 

Can anybody help?


Solution

  • If I've understood you right, it seems like QSplashScreen is what you need. It's actually a part of Qt, so you can use it without any limitations.