pyqt demo
来源:互联网 发布:人工智能的概念 编辑:程序博客网 时间:2024/06/05 07:45
# -*- coding: utf-8 -*-"""Module implementing MyDialog."""from PyQt4.QtCore import pyqtSignaturefrom PyQt4.QtGui import QDialogfrom PyQt4.QtGui import QApplicationfrom PyQt4.QtGui import QMessageBoxfrom PyQt4 import QtCorefrom Ui_maindlg import Ui_Dialogtry: _fromUtf8 = QtCore.QString.fromUtf8except AttributeError: def _fromUtf8(s): return s class MyDialog(QDialog, Ui_Dialog): """ Class documentation goes here. """ def __init__(self, parent=None): """ Constructor @param parent reference to the parent widget (QWidget) """ QDialog.__init__(self, parent) self.setupUi(self) @pyqtSignature("") def on_pushButton_clicked(self): """ Slot documentation goes here. """ self.label.setText("xxx") self.pushButton.setText('ok') # TODO: not implemented yet #raise NotImplementedError @pyqtSignature("") def on_pushButton_exit_clicked(self): """ Slot documentation goes here. """ QMessageBox.information(self, _fromUtf8("system标题"), _fromUtf8("warning消息"), QMessageBox.Yes) QMessageBox.information(self,"english","test",QMessageBox.Yes) Dialog.close() # TODO: not implemented yet #raise NotImplementedErrorif __name__ == "__main__": import sys app = QApplication(sys.argv) Dialog = MyDialog() Dialog.show() sys.exit(app.exec_())
0 0
- pyqt demo
- PyQT first demo
- PyQt版本的360 Demo
- Pyqt 浏览器截图小demo
- Pyqt print输出到控件中小demo
- Pyqt 滚动条的小demo
- Pyqt 浏览器禁止对话框小demo
- PyQt
- PyQt
- PyQt
- PYQT
- Pyqt 浏览器自动填充input框小demo
- Python + PyQt
- PyQt编程
- PyQt布局
- PyQt资料
- 编译PyQt
- PyQT tutorial
- opencv connectedComponentsWithStates
- Android中的优化问题
- opencv学习系列(七)--- 细化算法
- Cordys 内部类调用SOA【WebService】方法
- android简易双屏支持
- pyqt demo
- Struts2中的OGNL详解
- jQuery Mobile 资料
- 题目1527:首尾相连数组的最大子数组和
- 《python学习手册》(1)
- linux下文件二级系统设计
- 《机器学习实战》课程笔记(第1章)
- C#实现日志
- python3 urllib.request抓资源的方式