随笔分类 -  pyqt

摘要:``` exit = QtGui.QAction(QtGui.QIcon(':/log.ico'), 'Exit', self) exit.setShortcut('Ctrl+Q') exit.setStatusTip('Exit Application') self.connect(exit, QtCore.SIGNAL('trig... 阅读全文
posted @ 2017-03-30 15:51 idlewith 阅读(135) 评论(0) 推荐(0)
摘要:``` def center(self): screen = QtGui.QDesktopWidget().screenGeometry() size = self.geometry() self.move((screen.width()-size.width())/2, (screen.height()-size.height())/2) `... 阅读全文
posted @ 2017-03-30 14:38 idlewith 阅读(249) 评论(0) 推荐(0)
摘要:``` def closeEvent(self, QCloseEvent): reply = QtGui.QMessageBox.question(self, 'Message', 'Are you sure to quit?', ... 阅读全文
posted @ 2017-03-30 14:35 idlewith 阅读(578) 评论(0) 推荐(0)
摘要:``` coding: utf 8 import re import csv import time try: from PySide.QtGui import QApplication from PySide.QtCore import QUrl, QEventLoop, QTimer from 阅读全文
posted @ 2017-03-17 15:41 idlewith 阅读(429) 评论(0) 推荐(0)
摘要:把 转换成 C:\Python27\Lib\site packages\PyQt4\uic\pyuic.py o t.py t.ui 使用ui布局 阅读全文
posted @ 2017-02-10 10:11 idlewith 阅读(300) 评论(0) 推荐(0)
摘要:coding:utf 8 import sys from PyQt4.QtGui import (QApplication, QWidget, QPushButton, QLineEdit, QHBoxLayout, QVBoxLayout, QColorDialog, QInputDialog, 阅读全文
posted @ 2017-02-10 00:42 idlewith 阅读(322) 评论(0) 推荐(0)
摘要:首先新建一个 .qrc 文件,内容格式如下: in the Terminal: inner_image.py 阅读全文
posted @ 2017-02-10 00:09 idlewith 阅读(227) 评论(0) 推荐(0)