You are here

22 December 2014

Create an application window using PyQt5 in Python. People at G+ suggested PyQt over Tkinter. So I am going to dig into that. I found a lot of tutorials about this process. Most of them included OOP. I wanted to have the simplest application window possible. In my research I also found out that there is a thing called "QTDesigner", you can design your GUI and then export it to .ui file and use "pyuic5 mygui.ui > mygui.py" to generate class file that you can use for rendering.

Source code viewer
  1. import sys
  2. from PyQt5.QtWidgets import QMainWindow, QApplication
  3.  
  4. if __name__ == '__main__':
  5.  
  6. application = QApplication(sys.argv)
  7.  
  8. window = QMainWindow()
  9. window.show()
  10.  
  11. sys.exit(application.exec_())
Programming Language: Python