- 浏览: 309350 次
文章分类
最新评论
-
ZT71363387:
多谢,帮我解决了抄送人收不到邮件的问题
python smtplib -
dsjt:
pythonw.exe 运行后无反应。版本不匹配啊。
python+PyQT+Eric安装配置 -
dsjt:
xp 32位系统安装eric后,目录下没有 .bat文件是怎么 ...
python+PyQT+Eric安装配置
#!/usr/bin/python
from PyQt4 import QtCore, QtGui
class WidgetGallery(QtGui.QDialog):
def __init__(self,parent=None):
super(WidgetGallery,self).__init__(parent)
self.palette = QtGui.QApplication.palette()
combo_box = QtGui.QComboBox()
combo_box.addItems(QtGui.QStyleFactory.keys())
label = QtGui.QLabel('style')
label.setBuddy(combo_box)
check_box_one = QtGui.QCheckBox('use')
check_box_one.setChecked(True)
check_box_two = QtGui.QCheckBox('disable')
self.createTopLeftGroupBox()
self.createTopRightGroupBox()
self.createBottomLeftTabWidget()
self.createBottomRightGroupBox()
self.createProgressBar()
combo_box.activated[str].connect(self.changeStyle)
check_box_one.toggled.connect(self.changePalette)
check_box_two.toggled.connect(self.topLeftGroupBox.setDisabled)
check_box_two.toggled.connect(self.topRightGroupBox.setDisabled)
check_box_two.toggled.connect(self.bottomLeftTabWidget.setDisabled)
check_box_two.toggled.connect(self.bottomRightGroupBox.setDisabled)
layout_x = QtGui.QHBoxLayout()
layout_x.addWidget(label)
layout_x.addWidget(combo_box)
layout_x.addStretch(1)
layout_x.addWidget(check_box_one)
layout_x.addWidget(check_box_two)
mainLayout = QtGui.QGridLayout()
mainLayout.addLayout(layout_x, 0, 0, 1, 2)
mainLayout.addWidget(self.topLeftGroupBox, 1, 0)
mainLayout.addWidget(self.topRightGroupBox, 1, 1)
mainLayout.addWidget(self.bottomLeftTabWidget, 2, 0)
mainLayout.addWidget(self.bottomRightGroupBox, 2, 1)
mainLayout.addWidget(self.progress_bar, 3, 0, 1, 2)
mainLayout.setRowStretch(1, 1)
mainLayout.setRowStretch(2, 1)
mainLayout.setColumnStretch(0, 1)
mainLayout.setColumnStretch(1, 1)
self.setLayout(mainLayout)
self.setWindowTitle('style') #self.resize(100,100)
def changeStyle(self,styleName):
QtGui.QApplication.setStyle(QtGui.QStyleFactory.create(styleName))
self.changePalette()
def changePalette(self):
if (check_box_one.isChecked()):
QtGui.QApplication.setPalette(QtGui.QApplication.style().standardPalette())
else:
QtGui.QApplication.setPalette(self.originalPalette)
def advanceProgressBar(self):
curval = self.progress_bar.value()
maxval = self.progress_bar.maximum()
self.progress_bar.setValue(curval+(maxval-curval)/100)
def createTopLeftGroupBox(self):
self.topLeftGroupBox = QtGui.QGroupBox('group_one')
button1 = QtGui.QRadioButton('radio_button_a')
button2 = QtGui.QRadioButton('radio_button_a')
button3 = QtGui.QRadioButton('radio_button_a')
button1.setChecked(True)
layout = QtGui.QVBoxLayout()
layout.addWidget(button1)
layout.addWidget(button2)
layout.addWidget(button3)
self.topLeftGroupBox.setLayout(layout)
def createTopRightGroupBox(self):
self.topRightGroupBox = QtGui.QGroupBox('group_two')
def createBottomLeftTabWidget(self):
self.bottomLeftTabWidget = QtGui.QTabWidget()
tab1 = QtGui.QWidget()
table1 = QtGui.QTableWidget(5,5)
tab1_layout = QtGui.QHBoxLayout()
tab1_layout.setMargin(5)
tab1_layout.addWidget(table1)
tab1.setLayout(tab1_layout)
tab2 = QtGui.QWidget()
table2 = QtGui.QTextEdit()
table2.setPlainText('hello world')
tab2_layout = QtGui.QHBoxLayout()
tab2_layout.setMargin(5)
tab2_layout.addWidget(table2)
tab2.setLayout(tab2_layout)
self.bottomLeftTabWidget.addTab(tab1,'table widget')
self.bottomLeftTabWidget.addTab(tab2,'text widget')
def createBottomRightGroupBox(self):
self.bottomRightGroupBox = QtGui.QGroupBox('group_three')
def createProgressBar(self):
self.progress_bar = QtGui.QProgressBar()
self.progress_bar.setRange(0,10000)
self.progress_bar.setValue(0)
timer = QtCore.QTimer(self)
timer.timeout.connect(self.advanceProgressBar)
timer.start(1000)
if __name__ == '__main__':
import sys
app = QtGui.QApplication(sys.argv)
gallery = WidgetGallery()
gallery.show()
sys.exit(app.exec_())
http://www.cnblogs.com/eth0/archive/2011/07/10/2102266.html
http://home.cnblogs.com/u/eth0/feed/blog/
发表评论
-
PYQT 控件基本使用
2015-09-23 13:07 1889QtGui.QComboBox控件常用函数: .a ... -
PyQt example
2015-09-11 10:11 739http://www.programcreek.com/py ... -
PyQt 界面控件常用积累
2015-09-08 15:09 2489QtGui.QApplication(sys.argv) # ... -
Ubuntu 12.04 安装PYQT4和Eric4
2013-05-09 16:40 902Ubuntu 12.04 安装PYQT4和Eric4 ... -
PyQt中登录框设计
2013-05-07 16:43 1266http://www.jimmykuu.me/blog/10 ... -
PyQt中弹出对话框操作
2013-05-07 16:41 3159http://www.jimmykuu.me/blog/9 ... -
QStackedWidget
2013-05-06 16:44 1402#!/sur/bin/python import sys ... -
PyQt4 登陆界面
2013-05-03 15:53 2457对于初次做GUI程序的 ... -
PyQt4 常用的窗口组件
2013-04-20 12:02 1710扩展知识: 熟悉常用的窗口组件: 1 按钮类 ... -
PyQt4 Dir view
2012-12-10 11:38 740#!/usr/bin/python#--coding:GBK- ... -
PyQt4 wizard
2012-12-10 11:24 849#!/usr/bin/python import sysfr ... -
PyQt4 QMainWindow()
2012-11-28 14:48 1348#!/usr/bin/python#--coding:GBK- ... -
PyQt4 QGroupBox()
2012-11-21 18:25 2040#!/usr/bin/python#--coding:GBK- ... -
Ubuntu下安装配置Python 3.2.3集成开发环境Eric5
2012-11-18 13:48 2689Eric5 是一个集成了项目管理功能的 Pytho ... -
PyQt4 使用教程
2012-11-17 00:14 18034PyQt4 QListWidget 使用教程 li ... -
PyQt 界面控件常用积累
2012-11-16 23:59 2751PyQt 界面控件常用积累 QtGui.QAp ... -
PyQt4 QTabWidget
2012-11-16 22:26 3827#!/usr/bin/python#--coding:GBK- ... -
PyQt4 QDialog
2012-11-16 22:25 1200#!/usr/bin/python# tabdialog.py ... -
PyQt4 QTabWidget
2012-11-16 10:39 1363#!/usr/bin/python from PyQt ... -
PyQt4 QListWidget
2012-11-14 17:05 4768http://blog.sina.com.cn/s/blog_ ...
相关推荐
pyqt样式表 安装 python setup.py build python setup.py install 或者 python setup.py sdist ...创建PyQt的资源文件style.qrc含style.qss和其他文件,如图标的PNG 创建pyqt资源文件style.qss 资源python
pyqt4精彩实例讲解,适合pyqt4初级学习者,经供参考第6行创建了一个 QPush Button对象,并设置它的显示文木为“ Hello Kitty!",由于此处并 没有指定按钮的父窗体,因此以自己作为主窗凵 第7行调用show()方法,显示...
简单易懂级的pyqt界面初步开发程序资源,非常有助于了解button信号与槽之间的关系。
主要介绍了python GUI库图形界面开发之PyQt5图片显示控件QPixmap详细使用方法与实例,需要的朋友可以参考下
The Insider's Best-Practice Guide to Rapid PyQt 4 GUI Development Whether you're building GUI prototypes or full-fledged cross-platform GUI applications with native look-and-feel, PyQt 4 is your ...
4.当然也鼓励大家基于此进行二次开发。在使用过程中,如有问题或建议,请及时私信沟通。 5.期待你能在项目中找到乐趣和灵感,也欢迎你的分享和反馈! 【资源说明】 基于Pyqt5+Sqlite3开发的学生通讯录管理系统python...
# PyQt6窗口添加菜单栏 工具栏和任务栏 包含应用美观样式 代码写有中文注释,方便学习。 运行 `main.py` 查看应用菜单栏、工具栏和任务栏的普通窗口; 运行 `main_vscode_style.py` 查看应用菜单栏、工具栏和任务...
首先新建一个扩展名为.qss的文件,如style.qss,然后将其加入资源文件(.qrc)中,在style.qss文件中编写样式代码,例如 QMainWindow{ border-image:url(./images/screen1.jpg); } QToolTip{ border:
Building custom widgets: Widget Style Sheets, composite widgets, subclassing, and more Making the most of Qt 's new graphics/view architecture Connecting to databases, executing SQL queries, and ...
qtbox是一个针对C、Qt用户的工具,它包含了很多常见和有用的PyQt & PySide & C/Qt控件示例,可以帮助我们节省开发时间。你可以通过点击主界面的编辑按钮或者在命令行中输入qtbox-qss来打开QSS编辑器。包含qtbox.exe...
JDK api,Hibernate api,PHP api,Android api,Jvascript api,Html api,JEasyUI api,JQuery api,JSP api,JSTL api,Mysql api,Servlet,W3CShool api,Cascading+Style+Sheet+2.0+Handbook api,等等api的汇总...
English | QssStylesheetEditor QssStylesheetEditor是功能强大的qt样式表(QSS)编辑器。 实时预览,自动完成,用户可以定义自定义变量。 ...屏幕截图 产品特点 Qss代码突出显示和代码折叠 自动完成 ...
国外大牛写的黑色样式表,很齐全,基于pyqt的,单纯的用于Qt只需要提取一下即可。 位置:QDarkStyle-2.5.1\qdarkstyle
It is embedded within the structure and style of websites and needs to be carefully extracted. Web scraping is becoming increasingly useful as a means to gather and make sense of the wealth of ...
PyQt5 plug-in, you can use PyQt5 to write custom controls 【PyQt5 插件,可以通过 PyQt5 编写设计师自定义控件】 Style editor with auto-complete, QSS format, QSS lint 【QSS 编辑器优化】 Ui Files ...
You'll determine when and how to scrape data from a JavaScript-dependent website using PyQt and Selenium. You'll get a better understanding of how to submit forms on complex websites protected by ...
GooDoc随附4个样式表,展示了其简单HTML结构提供的可能性。 GooDoc带有易于使用的GUI,可轻松添加样式表和直观的文档配置。 还可以使用GooDoc将样式表一次添加到许多HTML文件中! Windows安装程序可。
QDarkStyleSheet:QtWidgets应用程序的深色样式表