摘要:
QLineEdit类是一个单行文本框控件,可以输入单行字符串,如果需要输入多行字符串,使用QTextEdit类。 QLineEdit类中的常用方法: setAkignment(): 按固定值方式对齐文本: Qt.AlignLeft,水平方向靠左对齐。 Qt.AlignRight,水平方向靠右对齐 Q 阅读全文
posted @ 2020-07-30 17:27
胸怀丶若谷
阅读(617)
评论(0)
推荐(0)
摘要:
1 from PyQt5.QtWidgets import * 2 import sys 3 4 class QlabelDemo(QDialog): 5 def __init__(self): 6 super().__init__() 7 8 self.setWindowTitle('QLabel 阅读全文
posted @ 2020-07-30 16:57
胸怀丶若谷
阅读(690)
评论(0)
推荐(1)
摘要:
1 from PyQt5.QtWidgets import QApplication, QLabel, QWidget, QVBoxLayout 2 from PyQt5.QtCore import Qt 3 from PyQt5.QtGui import QPixmap, QPalette 4 i 阅读全文
posted @ 2020-07-30 15:19
胸怀丶若谷
阅读(177)
评论(0)
推荐(0)
摘要:
setAlignment: 按固定值方式对齐文本 Qt.AlignLeft:水平方向靠左对齐 Qt.AlignRight:水平方向靠右对齐 Qt.AlignCenter:水平方向居中对齐 Qt.AlignJustify:水平方向调整间距两端对齐 Qt.AlignTop:垂直方向靠上对齐 Qt.Ali 阅读全文
posted @ 2020-07-30 14:43
胸怀丶若谷
阅读(1337)
评论(0)
推荐(0)
摘要:
1 """设置一个气泡提示""" 2 3 import sys 4 from PyQt5.QtWidgets import QWidget, QToolTip, QApplication 5 from PyQt5.QtGui import QFont 6 7 class Winform(QWidge 阅读全文
posted @ 2020-07-30 14:28
胸怀丶若谷
阅读(135)
评论(0)
推荐(0)
摘要:
import sys from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QWidget, QApplication # 创建一个Icon类,继承Qwidget类 class Icon(QWidget): def __init__(se 阅读全文
posted @ 2020-07-30 14:16
胸怀丶若谷
阅读(208)
评论(0)
推荐(0)
摘要:
1 """关闭主窗口""" 2 3 from PyQt5.QtWidgets import QMainWindow, QHBoxLayout, QPushButton, QApplication, QWidget 4 import sys 5 6 class WinForm(QMainWindow) 阅读全文
posted @ 2020-07-30 14:15
胸怀丶若谷
阅读(118)
评论(0)
推荐(0)
摘要:
1 """主窗口居中""" 2 from PyQt5.QtWidgets import QDesktopWidget, QApplication, QMainWindow 3 import sys 4 5 class Winform(QMainWindow): 6 7 def __init__(se 阅读全文
posted @ 2020-07-30 14:06
胸怀丶若谷
阅读(169)
评论(0)
推荐(0)
摘要:
1 """创建主窗口""" 2 import sys 3 from PyQt5.QtWidgets import QMainWindow, QApplication 4 from PyQt5.QtGui import QIcon 5 6 class MainWindow(QMainWindow): 阅读全文
posted @ 2020-07-30 14:02
胸怀丶若谷
阅读(183)
评论(0)
推荐(0)
摘要:
1 import sys 2 from PyQt5.QtWidgets import QApplication,QWidget,QPushButton 3 4 app = QApplication(sys.argv) 5 widget = QWidget() 6 btn = QPushButton( 阅读全文
posted @ 2020-07-30 14:00
胸怀丶若谷
阅读(264)
评论(0)
推荐(0)

浙公网安备 33010602011771号