Joker 1 سال پیش
والد
کامیت
b95bf6575a
5فایلهای تغییر یافته به همراه121 افزوده شده و 0 حذف شده
  1. 9 0
      day3/code/ex_qt01.py
  2. 3 0
      day3/code/notes.txt
  3. 0 0
      day4/monitor/main.py
  4. 63 0
      day4/monitor/ui/monitor.ui
  5. 46 0
      day4/monitor/ui/monitor_ui.py

+ 9 - 0
day3/code/ex_qt01.py

@@ -0,0 +1,9 @@
+# 引入模块 
+from PyQt5.QtWidgets import QApplication
+from PyQt5.QtWidgets import QDialog
+# 创建QT应用
+app = QApplication([]) 
+dlg = QDialog()
+dlg.resize(500,500)
+dlg.show()
+app.exec()

+ 3 - 0
day3/code/notes.txt

@@ -0,0 +1,3 @@
+1.条件
+   安装 Pyqt5  Pyqt5-tools
+   where python确定安装路径

+ 0 - 0
day4/monitor/main.py


+ 63 - 0
day4/monitor/ui/monitor.ui

@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>529</width>
+    <height>433</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <widget class="QLabel" name="label">
+   <property name="geometry">
+    <rect>
+     <x>0</x>
+     <y>30</y>
+     <width>111</width>
+     <height>81</height>
+    </rect>
+   </property>
+   <property name="styleSheet">
+    <string notr="true">border-width:2px;
+border-style:solid;
+border-radius:10px;
+border-top-color:black;
+border-left-color:red;
+border-botton-color:green;
+border-right-color:red;</string>
+   </property>
+   <property name="text">
+    <string>视频显示</string>
+   </property>
+  </widget>
+  <widget class="QPushButton" name="pushButton">
+   <property name="geometry">
+    <rect>
+     <x>200</x>
+     <y>200</y>
+     <width>151</width>
+     <height>121</height>
+    </rect>
+   </property>
+   <property name="styleSheet">
+    <string notr="true">border-width:2px;
+border-style:solid;
+border-radius:5px;
+border-top-color:#ffffff;
+border-left-color:#ffffff;
+border-botton-color:#88888888;
+border-right-color:#bbbbbb;</string>
+   </property>
+   <property name="text">
+    <string>视频</string>
+   </property>
+  </widget>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

+ 46 - 0
day4/monitor/ui/monitor_ui.py

@@ -0,0 +1,46 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'monitor.ui'
+#
+# Created by: PyQt5 UI code generator 5.15.9
+#
+# WARNING: Any manual changes made to this file will be lost when pyuic5 is
+# run again.  Do not edit this file unless you know what you are doing.
+
+
+from PyQt5 import QtCore, QtGui, QtWidgets
+
+
+class Ui_Dialog(object):
+    def setupUi(self, Dialog):
+        Dialog.setObjectName("Dialog")
+        Dialog.resize(529, 433)
+        self.label = QtWidgets.QLabel(Dialog)
+        self.label.setGeometry(QtCore.QRect(0, 30, 111, 81))
+        self.label.setStyleSheet("border-width:2px;\n"
+"border-style:solid;\n"
+"border-radius:10px;\n"
+"border-top-color:black;\n"
+"border-left-color:red;\n"
+"border-botton-color:green;\n"
+"border-right-color:red;")
+        self.label.setObjectName("label")
+        self.pushButton = QtWidgets.QPushButton(Dialog)
+        self.pushButton.setGeometry(QtCore.QRect(200, 200, 151, 121))
+        self.pushButton.setStyleSheet("border-width:2px;\n"
+"border-style:solid;\n"
+"border-radius:5px;\n"
+"border-top-color:#ffffff;\n"
+"border-left-color:#ffffff;\n"
+"border-botton-color:#88888888;\n"
+"border-right-color:#bbbbbb;")
+        self.pushButton.setObjectName("pushButton")
+
+        self.retranslateUi(Dialog)
+        QtCore.QMetaObject.connectSlotsByName(Dialog)
+
+    def retranslateUi(self, Dialog):
+        _translate = QtCore.QCoreApplication.translate
+        Dialog.setWindowTitle(_translate("Dialog", "Dialog"))
+        self.label.setText(_translate("Dialog", "视频显示"))
+        self.pushButton.setText(_translate("Dialog", "视频"))