国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > Python > 正文

python之線程通過信號pyqtSignal刷新ui的方法

2020-02-16 00:35:50
字體:
來源:轉載
供稿:網友

第一部分:UI界面設計

界面效果圖如下:

python之線程通過信號pyqtSignal刷新ui

ui文件(可拉動控件自行創建一個button和text)

<?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>585</width>  <height>394</height>  </rect> </property> <property name="windowTitle">  <string>Dialog</string> </property> <widget class="QPushButton" name="pushButton">  <property name="geometry">  <rect>   <x>230</x>   <y>320</y>   <width>75</width>   <height>23</height>  </rect>  </property>  <property name="text">  <string>timer_click</string>  </property> </widget> <widget class="QTextEdit" name="textEdit">  <property name="geometry">  <rect>   <x>70</x>   <y>30</y>   <width>441</width>   <height>231</height>  </rect>  </property> </widget> </widget> <resources/> <connections> <connection>  <sender>pushButton</sender>  <signal>clicked()</signal>  <receiver>Dialog</receiver>  <slot>timer_click()</slot>  <hints>  <hint type="sourcelabel">   <x>217</x>   <y>229</y>  </hint>  <hint type="destinationlabel">   <x>250</x>   <y>241</y>  </hint>  </hints> </connection> </connections> <slots> <slot>timer_click()</slot> </slots></ui>

生成的py文件

# -*- coding: utf-8 -*-# Form implementation generated from reading ui file 'TEST_QT_FROM.ui'## Created by: PyQt5 UI code generator 5.11.3## WARNING! All changes made in this file will be lost!from PyQt5 import QtCore, QtGui, QtWidgetsclass Ui_Dialog(object):  def setupUi(self, Dialog):    Dialog.setObjectName("Dialog")    Dialog.resize(585, 394)    self.pushButton = QtWidgets.QPushButton(Dialog)    self.pushButton.setGeometry(QtCore.QRect(230, 320, 75, 23))    self.pushButton.setObjectName("pushButton")    self.textEdit = QtWidgets.QTextEdit(Dialog)    self.textEdit.setGeometry(QtCore.QRect(70, 30, 441, 231))    self.textEdit.setObjectName("textEdit")    self.retranslateUi(Dialog)    self.pushButton.clicked.connect(Dialog.timer_click)    QtCore.QMetaObject.connectSlotsByName(Dialog)  def retranslateUi(self, Dialog):    _translate = QtCore.QCoreApplication.translate    Dialog.setWindowTitle(_translate("Dialog", "Dialog"))    self.pushButton.setText(_translate("Dialog", "timer_click"))            
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 衡山县| 尤溪县| 灵丘县| 东乡县| 新津县| 凤阳县| 股票| 大竹县| 澜沧| 克什克腾旗| 潜江市| 朝阳市| 蒙阴县| 台中市| 彩票| 土默特右旗| 博野县| 肇源县| 台北县| 湖口县| 盘锦市| 宿州市| 大渡口区| 梁山县| 曲水县| 兰西县| 宁津县| 巫溪县| 新源县| 惠州市| 松桃| 运城市| 巍山| 安仁县| 武城县| 波密县| 衡阳县| 什邡市| 安平县| 含山县| 临朐县|