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
- import sys
- from PyQt5.QtWidgets import QMainWindow, QApplication
- if __name__ == '__main__':
- application = QApplication(sys.argv)
- window = QMainWindow()
- sys.exit(application.exec_())Programming Language: Python