import sys
from PyQt5.QtWidgets import (QWidget, QToolTip,
QPushButton, QApplication)
from PyQt5.QtGui import QFont class Example(QWidget): def __init__(self):
super().__init__()
self.initUI() def initUI(self):
#Window设置
self.setGeometry(300, 300, 300, 200)
self.setWindowTitle('Tooltip提示信息')
self.setToolTip('This is a <b>Window</b>')
self.setFont(QFont('consolas',10)) #设置整个Window内字体 # Button设置
btn = QPushButton('Button', self)
btn.move(50, 50)
btn.resize(50,30)
#btn.setFont(QFont('simsun',12)) #仅设置Button的字体
btn.setToolTip('This is a <b>Button</b>') self.show() if __name__ == '__main__': app = QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())

最新文章

  1. Atitit sql计划任务与查询优化器--统计信息模块
  2. oracle细节
  3. 【BZOJ】【3164】【HEOI2013】Eden的博弈问题
  4. sublime text2中ctags安装问题的解决
  5. 图的最小生成树(Prim、Kruskal)
  6. 我用爬虫一天时间“偷了”知乎一百万用户,只为证明PHP是世界上最好的语言
  7. Write operations are not allowed in read-only mode (FlushMode.MANUAL): Turn
  8. jQuery中间each实施例的方法
  9. mongo数据库备份与恢复
  10. codeforces 755C. PolandBall and Forest
  11. P1361 小M的作物
  12. AC Dream1069
  13. spark-2.4.0-hadoop2.7-高可用(HA)安装部署
  14. springboot2.0以后WebMvcConfigurationSupport代替WebMvcConfigurationAdapter
  15. Codeforces 1132G Greedy Subsequences [线段树]
  16. __class__属性与元类
  17. vmware工具克隆linux系统步骤及配置
  18. mysql 阿里内核人员
  19. Spring主从数据库的配置和动态数据源切换原理
  20. sparkr脚本

热门文章

  1. Redux:异步操作
  2. ABAP基础4:模块化
  3. Spring 中基于 AOP 的 @AspectJ
  4. 量子纠错码——Clifford group
  5. ztree实用教程
  6. [COCOS2DX-LUA]0-003.根据COCOS2DX热更新
  7. CORS漏洞利用检测和利用方式
  8. js 识别二维码
  9. Liunx下使用wine容器实现跨平台使用软件
  10. SpringBoot整合Flyway(数据库版本迁移工具)