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 >" to generate class file that you can use for rendering.

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