Table of contents
0x00 Preface
About the configuration and other steps of the QtDesigner tool (there are also many online links)
The following links are not my own (if you have installed pyqt5 and tools on the command line using pip, you can skip the previous steps)
1. Start the program
If you are using the above tutorial, you can start it directly in the added extension tool
Then select the corresponding window to create
Interface display of some operations
(After checking, it will be displayed in the interface)
2. Basic use
1. Drag the control on the left to the icon, and then set the layout
2. Then preview
window--->preview
The preview interface can be clicked
3. Save the layout file
save it as
files with ui suffix
Fourth, load the UI file
load and display ui file
import sys
from PyQt5 import uic
from PyQt5.QtWidgets import *
if __name__ == '__main__':
app = QApplication(sys.argv)
ui = uic.loadUi("./my_win.ui") # 加载ui文件
ui.show() # 展示窗口
sys.exit(app.exec_())