pyqt5
iblctw
这个作者很懒,什么都没留下…
展开
-
Pyintsal打包爬坑
UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xce in position 110: invalid continuation byte这个错误,后来通过Google之后,解决方案如下:https://stackoverflow.com/questions/47692960/error-when-using-pyinstaller-unicodedecodeerror-utf-8-codec-cant-decode-byt其实就是:修改D原创 2020-08-21 17:05:07 · 205 阅读 · 0 评论 -
pyqt5 滚动条QScrollArea()例程
from PyQt5.QtWidgets import *from PyQt5.QtCore import *from PyQt5 import QtWidgetsimport sysclass MainWindow(QMainWindow): def __init__(self): super().__init__() self.initUI() def initUI(self): self.scroll = QScrollA转载 2020-07-06 20:08:30 · 1835 阅读 · 0 评论 -
Pyqt5 获取显示器的分辨率
import sysfrom PyQt5.QtWidgets import QApplication, QWidget class Example(QWidget): def __init__(self): super().__init__() self.initUI() # 界面绘制交给InitUi方法 def initUI(self): #获取显示器分辨率大小 self.screenRect = .原创 2020-07-05 19:38:15 · 494 阅读 · 0 评论 -
Pyqt5 button按键大小自适应
self.button_Adaptive = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) # 按钮大小自适应self.button_start = QtWidgets.QPushButton('开始')self.button_start.setSizePolicy(self.button_Adaptive)self.button_start.setObjectName原创 2020-07-04 18:12:57 · 5055 阅读 · 0 评论 -
PyQt5 设置QlineEdit禁止编辑并追加文本
PATH = QtWidgets.QLineEdit(self.centralwidget)PATH.setFocusPolicy(QtCore.Qt.NoFocus) #设置不可编辑Edittest.append('test')原创 2020-07-04 17:29:01 · 4386 阅读 · 1 评论 -
Pyqt5动态的添加控件
Pyqt 动态的添加控件// An highlighted block# -*- coding: utf-8 -*- 2 from PyQt4.QtCore import * 3 from PyQt4.QtGui import * 4 import sys 5 ''' 6 Pyqt 动态的添加控件 7 ''' 8 9 class DynAddObject(QDialog):10 def __init__(self, parent=None):11 super原创 2020-05-29 11:04:36 · 4893 阅读 · 0 评论