上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 34 下一页
摘要: 1、装载外部网页页面'''用web浏览器控件QWebEngineView控件显示网页PyQt5和Web的交互技术同时使用python和Web开发程序,混合开发Python+JavaScript+HTML5+CSS技术程序混合可做丰富的UI语言之间互相调用'''from PyQt5.QtWidgets 阅读全文
posted @ 2020-02-14 17:26 The-Chosen-One 阅读(1327) 评论(0) 推荐(0)
摘要: 1、绝对布局方式'''绝对布局方式,通过move的XY坐标方式来控制控件的位置'''from PyQt5.QtWidgets import *import sys,mathclass absolutelayout(QWidget): def __init__(self): super(absolut 阅读全文
posted @ 2020-02-14 17:03 The-Chosen-One 阅读(8371) 评论(0) 推荐(1)
摘要: 1、树控件的基本使用方法QTreeWidget'''QTreeWidget树控件的使用方法添加图标,添加表格,添加复选框等'''from PyQt5.QtWidgets import *from PyQt5.QtCore import Qtfrom PyQt5.QtGui import QIcon, 阅读全文
posted @ 2020-02-13 11:46 The-Chosen-One 阅读(4621) 评论(0) 推荐(0)
摘要: 1、显示二维列表数据(QTableView)控件 '''显示二维列表数据(QTableView)控件数据源model需要创建一个QTableView实例和一个数据源model,然后将其两者关联MVC模式 model viewer controller 前后端关联MVC的目的是将后端的数据和前端页面的 阅读全文
posted @ 2020-02-12 10:15 The-Chosen-One 阅读(6469) 评论(0) 推荐(1)
摘要: 1、打印机操作(打印默认文本里面的内容)from PyQt5 import QtGui,QtWidgets,QtPrintSupportfrom PyQt5.QtWidgets import *import sysclass Printsupport1(QMainWindow): def __ini 阅读全文
posted @ 2020-02-12 09:38 The-Chosen-One 阅读(1805) 评论(0) 推荐(0)
摘要: 1、使用剪切板import sys,mathfrom PyQt5.QtWidgets import *from PyQt5.QtGui import *from PyQt5.QtCore import *class Clipboard(QDialog): def __init__(self): su 阅读全文
posted @ 2020-02-11 09:50 The-Chosen-One 阅读(1596) 评论(0) 推荐(0)
摘要: 1、创建菜单栏import sys, mathfrom PyQt5.QtWidgets import *from PyQt5.QtGui import *from PyQt5.QtCore import *class menu(QMainWindow): def __init__(self): su 阅读全文
posted @ 2020-02-11 09:45 The-Chosen-One 阅读(1526) 评论(0) 推荐(0)
摘要: 1、日历控件QCalendarWidget控件import sys,mathfrom PyQt5.QtWidgets import *from PyQt5.QtGui import *from PyQt5.QtCore import *class mycalendar(QWidget): def _ 阅读全文
posted @ 2020-02-11 09:34 The-Chosen-One 阅读(2493) 评论(0) 推荐(1)
摘要: 让控件支持拖拽动作A.setDragEnable(True) 设置A可以拖动B.setAcceptDrops(True) 设置B可以接受拖动B需要满足两个事件1.dragEnterEvent 将A拖到B触发2.dropEvent 在B的区域放下A时发生触发具体实现代码如下所示:import sys, 阅读全文
posted @ 2020-02-11 09:25 The-Chosen-One 阅读(6149) 评论(0) 推荐(0)
摘要: PyQt5绘图API大全1、绘图API:绘制文本#1.文本 2.各种图形 3.图像#QPainter painter=QPainter() painter.begin() painter.end() painter.drawtext() 必须在painevent事件方法中绘制各种元素import s 阅读全文
posted @ 2020-02-11 09:21 The-Chosen-One 阅读(2880) 评论(0) 推荐(0)
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 34 下一页