diff --git a/CLASS/code/test_class_0711.py b/CLASS/code/test_class_0711.py
new file mode 100644
index 0000000..6be73c2
--- /dev/null
+++ b/CLASS/code/test_class_0711.py
@@ -0,0 +1,139 @@
+
+# ------------------- 繼承 -------------------------
+print(f'------------------- 繼承 -------------------------')
+class Lab_location:
+ def __init__(self):
+ self.location = "EL125"
+
+
+class Lab_student(Lab_location):
+ def __init__(self,student):
+ super().__init__()
+ self.student = student
+
+
+ def lab_detail(self):
+ print(f'student : {self.student}') # 原本定義的
+ print(f'Lab_位置 : {self.location}') # 可以從Lab_location 抓出物件
+
+student1 = Lab_student("M11112030")
+student1.lab_detail()
+
+# ---------------------封裝---------------------------
+print(f'------------------- 封裝 -------------------------')
+
+class Lab_student:
+ def __init__(self,name):
+ self.name = name
+ self.profession = "警察"
+
+ def student_name(self):
+ print(f'name : {self.name}')
+
+
+ def crime(self):
+ print(f'{self.name} 要來逮捕你了')
+
+ def __no_crime(self):
+ print(f'{self.name} 從你身邊路過')
+
+
+
+
+studen1 = Lab_student("王希名")
+studen1.student_name()
+studen1.crime()
+#studen1.__no_crime()
+
+
+# ----------------------多型-----------------------
+
+print(f'------------------- 多型 -------------------------')
+class Lab_location:
+ def __init__(self):
+ self.location = "EL125"
+
+class A1_student(Lab_location):
+ def __init__(self):
+ super().__init__()
+ def lab_detail(self):
+ print(f'M11112030 在 {self.location}')
+
+class A2_student(Lab_location):
+ def __init__(self):
+ super().__init__()
+ def lab_detail(self):
+ print(f'M11112031 在 {self.location}')
+
+class A3_student(Lab_location):
+ def __init__(self):
+ super().__init__()
+
+
+ def lab_detail(self):
+ print(f'M11112032 在 {self.location}')
+
+student1 = A1_student()
+student2 = A2_student()
+student3 = A3_student()
+
+student1.lab_detail()
+student2.lab_detail()
+student3.lab_detail()
+
+# ----------------多型---------------
+print(f'------------------- 多型 -------------------------')
+class Lab_location:
+ def __init__(self):
+ self.location = "EL125"
+
+class Lab_student(Lab_location):
+ def __init__(self,name):
+ super().__init__()
+ self.name = name
+ def lab_detail(self):
+ print(f'{self.name} 在 {self.location}')
+
+student1 = Lab_student("A")
+student2 = Lab_student("B")
+student3 = Lab_student("C")
+
+student1.lab_detail()
+student2.lab_detail()
+student3.lab_detail()
+
+# --------------------------------class-----------------------
+print(f'------------------- class -------------------------')
+class Person():
+ def __init__(self,name,age,weight,high):
+ self.eye = 2
+ self.hand = 2
+ self.noise = 1
+ self.leg = 2
+ self.money =0
+ self.name = name
+ self.age = age
+ self.weight = weight
+ self.high = high
+ def person_body_detail(self):
+ print(f'眼睛數量 : {self.eye}')
+ print(f'手數量 : {self.hand}')
+ print(f'鼻子數量 : {self.noise}')
+ print(f'腿數量 : {self.leg}')
+ def person_introduce(self):
+ high = float(self.high/100)
+ print(f'{self.name} {self.age}歲 {self.weight}公斤 {high}米 總資產{self.money}')
+
+
+test_1 = Person(name='王希銘',age = 37,weight=105,high=168)
+test_1.money = 20000
+test_1.person_body_detail()
+test_1.person_introduce()
+
+
+
+
+
+
+
+
diff --git a/Thread/code/img/1.jpg b/Thread/code/img/1.jpg
new file mode 100644
index 0000000..460a816
Binary files /dev/null and b/Thread/code/img/1.jpg differ
diff --git a/Thread/code/img/2.jpg b/Thread/code/img/2.jpg
new file mode 100644
index 0000000..8a6d3af
Binary files /dev/null and b/Thread/code/img/2.jpg differ
diff --git a/Thread/code/img/3.jpg b/Thread/code/img/3.jpg
new file mode 100644
index 0000000..bf3d2a5
Binary files /dev/null and b/Thread/code/img/3.jpg differ
diff --git a/Thread/code/img/66406109.jpg b/Thread/code/img/66406109.jpg
new file mode 100644
index 0000000..357d24a
Binary files /dev/null and b/Thread/code/img/66406109.jpg differ
diff --git a/Thread/code/test_Qthread_0716_main.py b/Thread/code/test_Qthread_0716_main.py
new file mode 100644
index 0000000..add169f
--- /dev/null
+++ b/Thread/code/test_Qthread_0716_main.py
@@ -0,0 +1,111 @@
+import cv2
+import sys, time, os
+import random
+import numpy as np
+from PyQt5 import QtCore, QtGui, QtWidgets
+from test_Qthread_0716_ui import Ui_MainWindow
+from PyQt5.QtCore import QDate,QTime
+from PyQt5.QtWidgets import QApplication, QFileDialog, QLabel,QMainWindow, QWidget, QPushButton
+from PyQt5.QtCore import QThread, pyqtSignal
+
+
+class ReadTime(QtCore.QThread): # 讀取時間
+ time_out = pyqtSignal(str) # 聲明一個帶字串參數的信號
+ def __init__(self, parent=None):
+ super().__init__(parent)
+ def run(self):
+ while True:
+ result = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) # 讀取當下時間
+ self.time_out.emit(f'{result}') # 傳送信号
+ self.msleep(500) # 休眠0.5秒
+
+
+class img_out(QtCore.QThread):
+ img_data = QtCore.pyqtSignal(np.ndarray)
+ data=pyqtSignal(str)
+ def __init__(self, parent=None):
+ super().__init__(parent)
+ self.img_path_list=['img/1.jpg','img/2.jpg','img/3.jpg']
+ def run(self):
+ data_list=["stone","scissors","cloth"]
+ while True:
+ img_num = random.randint(0,len(self.img_path_list)-1)
+ img = cv2.imread(self.img_path_list[img_num])
+ self.img_data.emit(img)
+ self.data.emit(data_list[img_num])
+ time.sleep(1)
+
+
+
+
+# 轉Qlabel的格式
+def label_to_view(img): # 原圖
+ img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) # QT顏色顯示轉換
+ Ny, Nx, _ = img.shape
+ img = QtGui.QImage(img.data, Nx, Ny, Nx * 3, QtGui.QImage.Format_RGB888) # 須改格式
+ return img
+
+class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
+ def __init__(self, parent=None): #按鍵設定
+ super(MainWindow, self).__init__(parent)
+ self.setupUi(self)
+
+ self.time = ReadTime()
+ self.time.start()
+ self.time.time_out.connect(self.settimeText)
+
+ self.person_1 = ""
+ self.person_2 = ""
+
+ self.img_out_1 = img_out()
+ self.img_out_1.start()
+ self.img_out_1.img_data.connect(self.show_view_1)
+ self.img_out_1.data.connect(self.show_data_1)
+
+ self.img_out_2 = img_out()
+ self.img_out_2.start()
+ self.img_out_2.img_data.connect(self.show_view_2)
+ self.img_out_2.data.connect(self.show_data_2)
+
+
+ def settimeText(self, str_in):
+ str_in = f'{str_in}'
+ self.view_time.setText(str_in)
+
+ def show_view_1(self,img):
+ img = label_to_view(img)
+ self.view_1.setPixmap(QtGui.QPixmap.fromImage(img))
+
+ def show_view_2(self,img):
+ img = label_to_view(img)
+ self.view_2.setPixmap(QtGui.QPixmap.fromImage(img))
+
+ def show_data_1(self,str):
+ self.person_1 = str
+ self.who_win()
+ def show_data_2(self,str):
+ self.person_2 = str
+ self.who_win()
+ def who_win(self):
+ if self.person_1=="scissors" and self.person_2 =="cloth":
+ self.textEdit.setText("Person_1_Win")
+ if self.person_1=="stone" and self.person_2 =="scissors":
+ self.textEdit.setText("Person_1_Win")
+ if self.person_1=="cloth" and self.person_2 =="stone":
+ self.textEdit.setText("Person_1_Win")
+
+ if self.person_2=="scissors" and self.person_1 =="cloth":
+ self.textEdit.setText("Person_2_Win")
+ if self.person_2=="stone" and self.person_1 =="scissors":
+ self.textEdit.setText("Person_2_Win")
+ if self.person_2=="cloth" and self.person_1 =="stone":
+ self.textEdit.setText("Person_2_Win")
+
+ if self.person_1 ==self.person_2:
+ self.textEdit.setText("NO_WIN")
+
+if __name__=='__main__':
+ app = QtWidgets.QApplication(sys.argv)
+ win = MainWindow()
+ win.show()
+ sys.exit(app.exec_())
\ No newline at end of file
diff --git a/Thread/code/test_Qthread_0716_ui.py b/Thread/code/test_Qthread_0716_ui.py
new file mode 100644
index 0000000..f7c1c53
--- /dev/null
+++ b/Thread/code/test_Qthread_0716_ui.py
@@ -0,0 +1,49 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'test_Qthread_0716_ui.ui'
+#
+# Created by: PyQt5 UI code generator 5.15.4
+#
+# 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_MainWindow(object):
+ def setupUi(self, MainWindow):
+ MainWindow.setObjectName("MainWindow")
+ MainWindow.resize(676, 465)
+ self.centralwidget = QtWidgets.QWidget(MainWindow)
+ self.centralwidget.setObjectName("centralwidget")
+ self.test_bt = QtWidgets.QPushButton(self.centralwidget)
+ self.test_bt.setGeometry(QtCore.QRect(10, 50, 81, 31))
+ self.test_bt.setObjectName("test_bt")
+ self.view_1 = QtWidgets.QLabel(self.centralwidget)
+ self.view_1.setGeometry(QtCore.QRect(100, 50, 251, 231))
+ self.view_1.setText("")
+ self.view_1.setObjectName("view_1")
+ self.view_2 = QtWidgets.QLabel(self.centralwidget)
+ self.view_2.setGeometry(QtCore.QRect(360, 50, 251, 231))
+ self.view_2.setText("")
+ self.view_2.setObjectName("view_2")
+ self.textEdit = QtWidgets.QTextEdit(self.centralwidget)
+ self.textEdit.setGeometry(QtCore.QRect(360, 330, 261, 71))
+ self.textEdit.setObjectName("textEdit")
+ self.view_time = QtWidgets.QLabel(self.centralwidget)
+ self.view_time.setGeometry(QtCore.QRect(10, 10, 251, 31))
+ self.view_time.setText("")
+ self.view_time.setObjectName("view_time")
+ MainWindow.setCentralWidget(self.centralwidget)
+ self.statusbar = QtWidgets.QStatusBar(MainWindow)
+ self.statusbar.setObjectName("statusbar")
+ MainWindow.setStatusBar(self.statusbar)
+
+ self.retranslateUi(MainWindow)
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+ def retranslateUi(self, MainWindow):
+ _translate = QtCore.QCoreApplication.translate
+ MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
+ self.test_bt.setText(_translate("MainWindow", "PushButton"))
diff --git a/Thread/code/test_Qthread_0716_ui.ui b/Thread/code/test_Qthread_0716_ui.ui
new file mode 100644
index 0000000..f8dfe74
--- /dev/null
+++ b/Thread/code/test_Qthread_0716_ui.ui
@@ -0,0 +1,84 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 676
+ 465
+
+
+
+ MainWindow
+
+
+
+
+
+ 10
+ 50
+ 81
+ 31
+
+
+
+ PushButton
+
+
+
+
+
+ 100
+ 50
+ 251
+ 231
+
+
+
+
+
+
+
+
+
+ 360
+ 50
+ 251
+ 231
+
+
+
+
+
+
+
+
+
+ 360
+ 330
+ 261
+ 71
+
+
+
+
+
+
+ 10
+ 10
+ 251
+ 31
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Thread/code/test_process_0719.py b/Thread/code/test_process_0719.py
new file mode 100644
index 0000000..1852461
--- /dev/null
+++ b/Thread/code/test_process_0719.py
@@ -0,0 +1,88 @@
+import multiprocessing as mp
+import time
+import os
+import threading
+
+
+# ----------------------------------------範例4------------------------------
+# A報數
+def A_Count_off():
+ for i in range(0,5):
+ print(f'A : {i}')
+ time.sleep(0.5)
+
+
+# B報數
+def B_Count_off():
+ for i in range(5,10):
+ print(f'B : {i}')
+ time.sleep(0.5)
+
+#
+# if __name__=='__main__':
+# process_list=[A_Count_off,B_Count_off]
+# process_name =[]
+# for i in range(0,len(process_list)):
+# process_name.append(mp.Process(target=process_list[i]))
+#
+# for i in range(0,len(process_name)):
+# process_name[i].start()
+# # process_name[i].join()
+#
+# for i in range(0,len(process_name)):
+# process_name[i].join()
+
+
+# ----------------------------------------範例5------------------------------
+
+def Count_off(code_name):
+ print('process {} '.format(os.getpid()))
+ print('thread {} '.format(threading.current_thread().name))
+ for i in range(0,5):
+ print(f'{code_name} : {i}')
+ time.sleep(0.5)
+
+# if __name__=='__main__':
+# process_name_list=["A","B","C","D"]
+# process_list=[]
+# for i in range(0,len(process_name_list)):
+# process_list.append(mp.Process(target=Count_off,args=process_name_list[i]))
+# for i in range(0,len(process_list)):
+# process_list[i].start()
+# for i in range(0,len(process_list)):
+# process_list[i].join()
+
+
+
+# ----------------------------範例6-----------------------------
+class Process_class(mp.Process):
+ def __init__(self, code_name):
+ mp.Process.__init__(self)
+ self.code_name = code_name
+
+ def run(self):
+ print('process {} '.format(os.getpid())) # 查看進程
+ print('thread {} '.format(threading.current_thread().name)) # 查看線程
+ for i in range(0,5):
+ print(f'{self.code_name} : {i}')
+ time.sleep(0.5)
+ def test_return(self):
+ return(f'{self.code_name}=END')
+
+if __name__=='__main__':
+ start_time = time.time()
+ process_name_list = ["A", "B", "C", "D"]
+ process_list = []
+ for i in range(0, len(process_name_list)):
+ process_list.append(Process_class(process_name_list[i]))
+ for i in range(0, len(process_list)):
+ process_list[i].start()
+ for i in range(0, len(process_list)):
+ process_list[i].join()
+
+ for i in range(0, len(process_list)):
+ print(process_list[i].test_return())
+
+
+
+
diff --git a/Thread/code/test_thread_0715.py b/Thread/code/test_thread_0715.py
new file mode 100644
index 0000000..5fb16e1
--- /dev/null
+++ b/Thread/code/test_thread_0715.py
@@ -0,0 +1,107 @@
+
+import threading
+from queue import Queue #Thread 無法回傳值,所以要使用 Queue.put() 將要傳回的值存入 Queue,再用 Queue.get() 取出
+import time
+import os
+
+# ----------------------------------------範例1------------------------------
+# A報數
+def A_Count_off():
+ for i in range(0,5):
+ print(f'A : {i}')
+ time.sleep(0.5)
+
+
+# B報數
+def B_Count_off():
+ for i in range(5,10):
+ print(f'B : {i}')
+ time.sleep(0.5)
+
+
+
+thread_list=[A_Count_off,B_Count_off]
+thread_num =[]
+# for i in range(0,len(thread_list)):
+# thread_num.append(threading.Thread(target=thread_list[i]))
+#
+# for i in range(0,len(thread_num)):
+# thread_num[i].start()
+# # thread_num[i].join()
+#
+# for i in range(0,len(thread_num)):
+# thread_num[i].join()
+
+
+
+# ----------------------------------------範例2------------------------------
+
+def Count_off(code_name):
+ print('process {} '.format(os.getpid()))
+ print('thread {} '.format(threading.current_thread().name))
+ for i in range(0,5):
+ print(f'{code_name} : {i}')
+ time.sleep(0.5)
+
+
+thread_name_list=["A","B","C","D"]
+
+thread_list=[]
+# for i in range(0,len(thread_name_list)):
+# thread_list.append(threading.Thread(target=Count_off,args=thread_name_list[i]))
+# for i in range(0,len(thread_list)):
+# thread_list[i].start()
+# for i in range(0,len(thread_list)):
+# thread_list[i].join()
+
+
+
+# ----------------------------------------範例3------------------------------
+
+class Thread_class(threading.Thread):
+ def __init__(self,code_name):
+ threading.Thread.__init__(self)
+ self.code_name = code_name
+
+ def run(self):
+ print('process {} '.format(os.getpid())) # 查看進程
+ print('thread {} '.format(threading.current_thread().name)) # 查看線程
+ for i in range(0,5):
+ print(f'{self.code_name} : {i}')
+ time.sleep(0.5)
+ def test_return(self):
+ return(f'{self.code_name}=END')
+
+
+
+thread_name_list=["A","B","C","D"]
+thread_list=[]
+for i in range(0,len(thread_name_list)):
+ thread_list.append(Thread_class(thread_name_list[i]))
+for i in range(0,len(thread_list)):
+ thread_list[i].start()
+for i in range(0,len(thread_list)):
+ thread_list[i].join()
+
+for i in range(0,len(thread_list)):
+ print(thread_list[i].test_return())
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pyqt5/CODE/Pyqt5/__pycache__/test_pyqt5_0712_ui.cpython-39.pyc b/pyqt5/CODE/Pyqt5/__pycache__/test_pyqt5_0712_ui.cpython-39.pyc
new file mode 100644
index 0000000..e32576e
Binary files /dev/null and b/pyqt5/CODE/Pyqt5/__pycache__/test_pyqt5_0712_ui.cpython-39.pyc differ
diff --git a/pyqt5/CODE/Pyqt5/stop.jpg b/pyqt5/CODE/Pyqt5/stop.jpg
new file mode 100644
index 0000000..4552f75
Binary files /dev/null and b/pyqt5/CODE/Pyqt5/stop.jpg differ
diff --git a/pyqt5/CODE/Pyqt5/test_pyqt5_0712.py b/pyqt5/CODE/Pyqt5/test_pyqt5_0712.py
new file mode 100644
index 0000000..be32b5a
--- /dev/null
+++ b/pyqt5/CODE/Pyqt5/test_pyqt5_0712.py
@@ -0,0 +1,76 @@
+import cv2
+import sys, time, os
+import numpy as np
+from PyQt5 import QtCore, QtGui, QtWidgets
+from test_pyqt5_0712_ui import Ui_MainWindow
+from PyQt5.QtCore import QDate,QTime
+from PyQt5.QtWidgets import QApplication, QFileDialog, QLabel,QMainWindow, QWidget, QPushButton
+from PyQt5.QtCore import QThread, pyqtSignal
+
+
+
+
+
+# 轉Qlabel的格式
+def label_to_view(img): # 原圖
+ img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) # QT顏色顯示轉換
+ Ny, Nx, _ = img.shape
+ img = QtGui.QImage(img.data, Nx, Ny, Nx * 3, QtGui.QImage.Format_RGB888) # 須改格式
+ return img
+
+
+
+
+class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
+ def __init__(self, parent=None): #按鍵設定
+ super(MainWindow, self).__init__(parent)
+ self.setupUi(self)
+
+ self.view_1.setScaledContents(True); #設定view_1 自適應大小
+
+ self.open_file_bt.clicked.connect(self.open_file_clicked) # 按鍵open
+ self.horizontalSlider.valueChanged.connect(self.sliderValue) # 滑桿調整
+
+ self.img_check=False # 確認有無圖片
+
+ # 選擇圖片
+ def open_file_clicked(self):
+ file_filter = "Image Files (*.jpg *.jpeg *.png *.bmp *.mp4 *.avi);" # 規定格式
+ file_path, _ = QFileDialog.getOpenFileName(self, 'Open Image','',file_filter)
+ # 若沒圖 直接return 不執行下面程式
+ if file_path =="":
+ return
+ if file_path:
+ self.img_check = True
+ self.img = cv2.imread(file_path)
+ img = self.img.copy()
+ img = label_to_view(img)
+ self.view_1.setPixmap(QtGui.QPixmap.fromImage(img))
+ # 滑桿控制
+ def sliderValue(self):
+ # 若沒圖 直接return 不執行下面程式
+ if self.img_check==False:
+ return
+
+ binary_value = int(self.horizontalSlider.value()) # 二值化參數
+ self.horizontalSlider_text.setText(str(binary_value)) # 顯示數值
+ img = self.img.copy()
+ img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
+ if binary_value < 2:
+ return
+ if (binary_value % 2 == 1):
+ img1 = cv2.adaptiveThreshold(img, 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, binary_value, 2) # 動態二值
+ else:
+ img1 = cv2.adaptiveThreshold(img, 255, cv2.ADAPTIVE_THRESH_MEAN_C, cv2.THRESH_BINARY, binary_value + 1, 2) # 動態二值
+ img1 = cv2.cvtColor(img1, cv2.COLOR_GRAY2BGR)
+ img = label_to_view(img1)
+ self.view_1.setPixmap(QtGui.QPixmap.fromImage(img))
+
+
+
+
+if __name__=='__main__':
+ app = QtWidgets.QApplication(sys.argv)
+ win = MainWindow()
+ win.show()
+ sys.exit(app.exec_())
\ No newline at end of file
diff --git a/pyqt5/CODE/Pyqt5/test_pyqt5_0712_ui.py b/pyqt5/CODE/Pyqt5/test_pyqt5_0712_ui.py
new file mode 100644
index 0000000..06f89ef
--- /dev/null
+++ b/pyqt5/CODE/Pyqt5/test_pyqt5_0712_ui.py
@@ -0,0 +1,64 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'test_pyqt5_0712_ui.ui'
+#
+# Created by: PyQt5 UI code generator 5.15.4
+#
+# 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_MainWindow(object):
+ def setupUi(self, MainWindow):
+ MainWindow.setObjectName("MainWindow")
+ MainWindow.resize(1100, 864)
+ self.centralwidget = QtWidgets.QWidget(MainWindow)
+ self.centralwidget.setObjectName("centralwidget")
+ self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
+ self.gridLayout.setObjectName("gridLayout")
+ self.open_file_bt = QtWidgets.QPushButton(self.centralwidget)
+ self.open_file_bt.setMinimumSize(QtCore.QSize(91, 51))
+ self.open_file_bt.setMaximumSize(QtCore.QSize(131, 81))
+ self.open_file_bt.setObjectName("open_file_bt")
+ self.gridLayout.addWidget(self.open_file_bt, 0, 0, 1, 1)
+ self.view_1 = QtWidgets.QLabel(self.centralwidget)
+ self.view_1.setMinimumSize(QtCore.QSize(641, 491))
+ self.view_1.setObjectName("view_1")
+ self.gridLayout.addWidget(self.view_1, 0, 1, 2, 3)
+ spacerItem = QtWidgets.QSpacerItem(20, 736, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
+ self.gridLayout.addItem(spacerItem, 1, 0, 2, 1)
+ self.horizontalSlider = QtWidgets.QSlider(self.centralwidget)
+ self.horizontalSlider.setMinimumSize(QtCore.QSize(301, 22))
+ self.horizontalSlider.setMinimum(1)
+ self.horizontalSlider.setMaximum(255)
+ self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
+ self.horizontalSlider.setObjectName("horizontalSlider")
+ self.gridLayout.addWidget(self.horizontalSlider, 2, 1, 1, 1)
+ self.horizontalSlider_text = QtWidgets.QTextEdit(self.centralwidget)
+ self.horizontalSlider_text.setMinimumSize(QtCore.QSize(156, 71))
+ self.horizontalSlider_text.setMaximumSize(QtCore.QSize(156, 71))
+ font = QtGui.QFont()
+ font.setFamily("Agency FB")
+ font.setPointSize(24)
+ self.horizontalSlider_text.setFont(font)
+ self.horizontalSlider_text.setLayoutDirection(QtCore.Qt.LeftToRight)
+ self.horizontalSlider_text.setObjectName("horizontalSlider_text")
+ self.gridLayout.addWidget(self.horizontalSlider_text, 2, 2, 1, 1)
+ spacerItem1 = QtWidgets.QSpacerItem(405, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
+ self.gridLayout.addItem(spacerItem1, 2, 3, 1, 1)
+ MainWindow.setCentralWidget(self.centralwidget)
+ self.statusbar = QtWidgets.QStatusBar(MainWindow)
+ self.statusbar.setObjectName("statusbar")
+ MainWindow.setStatusBar(self.statusbar)
+
+ self.retranslateUi(MainWindow)
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+ def retranslateUi(self, MainWindow):
+ _translate = QtCore.QCoreApplication.translate
+ MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
+ self.open_file_bt.setText(_translate("MainWindow", "選擇圖片"))
+ self.view_1.setText(_translate("MainWindow", "TextLabel"))
diff --git a/pyqt5/CODE/Pyqt5/test_pyqt5_0712_ui.ui b/pyqt5/CODE/Pyqt5/test_pyqt5_0712_ui.ui
new file mode 100644
index 0000000..4c21114
--- /dev/null
+++ b/pyqt5/CODE/Pyqt5/test_pyqt5_0712_ui.ui
@@ -0,0 +1,126 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 1100
+ 864
+
+
+
+ MainWindow
+
+
+
+ -
+
+
+
+ 91
+ 51
+
+
+
+
+ 131
+ 81
+
+
+
+ 選擇圖片
+
+
+
+ -
+
+
+
+ 641
+ 491
+
+
+
+ TextLabel
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 736
+
+
+
+
+ -
+
+
+
+ 301
+ 22
+
+
+
+ 1
+
+
+ 255
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+ 156
+ 71
+
+
+
+
+ 156
+ 71
+
+
+
+
+ Agency FB
+ 24
+
+
+
+ Qt::LeftToRight
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 405
+ 20
+
+
+
+
+
+
+
+
+
+
+