1 import sys 2 from PyQt5.QtGui import QPixmap 3 from PyQt5.QtWidgets import QApplication, QWidget, QRadioButton, QLabel, QHBoxLayout, QVBoxLayout 4 5... ...
分类:
其他好文 时间:
2019-02-09 17:49:04
阅读次数:
281
#资料 http://blog.sina.com.cn/s/blog_6483fa330102xo6w.html例子import sysfrom PyQt5.QtWidgets import QApplication, QWidget, QLabelfrom PyQt5.QtGui import Q... ...
分类:
其他好文 时间:
2019-02-08 10:18:11
阅读次数:
820
pyqt pyside QPushButton 图标(icon)大小自适应设置 img = QtGui.QImage(r'd:/test.png') pixmap = QtGui.QPixmap(img) fitPixmap = pixmap.scaled(64, 64, QtCore.Qt.Ign ...
分类:
其他好文 时间:
2019-01-23 15:43:26
阅读次数:
676
# coding=utf-8 import sys from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * class Example(QWidget): def __init__(self... ...
分类:
其他好文 时间:
2019-01-12 19:54:48
阅读次数:
283
简介1SylixOSFB12.1插件的初始化12.2窗口绘制12.3SylixOSFB的实现21.简介Qt是目前一款比较主流的人机交互界面库。它有很强的跨平台能力,可移植性好,被广泛应用在PC端以及嵌入式领域。Qt可大致分为两部分:QtGui和QtCore,QtGui提供开发人员一套完整的开发控件,可以快速开发客户端界面;QtCore则负责底层渲染以及事件驱动等。而本章节主要介绍的是Qt的渲染机制
分类:
其他好文 时间:
2018-12-24 19:52:34
阅读次数:
282
一. 状态栏 状态栏是由QMainWindow创建的。 调用QtGui.QMainWindow类的statusBar()方法,创建状态栏。第一次调用创建一个状态栏,返回一个状态栏对象。showMessage()方法在状态栏上显示一条信息。 二 菜单栏 我们创建了只有一个命令的菜单栏,这个命令就是终止 ...
分类:
其他好文 时间:
2018-12-24 00:10:29
阅读次数:
193
Qt事件处理 Qt事件处理的五个层次 Qt 应用程序 事件处理 的五个层次,同时也是时间流程如下图所示: 说明如下: QT 自定义事件 Qt自定义事件的实现也是按照五个层次的原理实现的 1 1 #include <QtGui/QApplication> 2 2 #include <QCoreAppl ...
分类:
其他好文 时间:
2018-11-29 10:55:06
阅读次数:
219
并需要在pro文件里加上 greaterThan(QT_MAJOR_VERSION, 4): QT += widgets 并将引用的#include <QtGui>替换为#include <QtWidgets> C++ GUI Programming with Qt 4上一段代码,编译不能通过: 1 ...
分类:
其他好文 时间:
2018-11-22 11:48:09
阅读次数:
163
PyQt5 PyQt5是一个基于强大的图形程式框架Qt5的python接口, 主要包含以下几个大类: ● QtCore ● QtGui ● QtWidgets ● QtMultimedia ● QtBluetooth ● QtNetwork ● QtPositioning ● Enginio ● Q ...
分类:
编程语言 时间:
2018-11-05 11:32:19
阅读次数:
270
from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from PyQt5.QtWebEngineWidgets import * import sys class MainWindow(... ...
分类:
Web程序 时间:
2018-11-01 11:44:46
阅读次数:
507