PyQT5 kernel getting dead while launching a simple programme..



  • Hiiii everyone, I am new using lib PyQT5.

    I wondering why my computer crash when try this code ?

    from PyQt5 import QtGui
    from PyQt5.QtWidgets import QApplication, QMainWindow
    import sys
    
    class Window(QMainWindow):
        
        def __init__(self):
            super().__init__()
            
            self.title = "PyQt5 Window"
            self.top = 100
            self.left = 100
            self.width = 680 
            self.height = 500
            self.InitWindow()
            
      def InitWindow(self):
            self.setWindowTitle(self.title)
            self.setGeometry(self.top,self.left,self.width,self.height)
            self.show()
    
    App = QApplication(sys.argv)
    window = Window()
    sys.exit(App.exec())
    

    the kernel is getting dead...


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What version of PyQt5 are you using ?
    What version of Qt is it built on ?
    How did you install both of them ?
    What Linux flavour are you running ?
    What graphics card do you have ?
    What driver are you using for it ?
    What do your kernel logs tell you ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.