生活会辜负努力的人,但不会辜负一直努力的人

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2018年4月2日

摘要: 当点击窗口的X按钮时,弹出确认退出消息框,继续点击Yes,退出。否则,窗口继续处于打开状态 代码: If we close a QWidget, the QCloseEvent is generated. To modify the widget behaviour we need to reimp 阅读全文
posted @ 2018-04-02 22:23 何许亻也 阅读(217) 评论(0) 推荐(0)

摘要: 如图所示,当点击quit按钮时,退出窗口 代码: 1 """ 2 This program creates a quit 3 button. When we press the button, 4 the application terminates. 5 """ 6 7 import sys 8 阅读全文
posted @ 2018-04-02 21:55 何许亻也 阅读(404) 评论(0) 推荐(0)

摘要: 效果如下(由于不方便截图,就另存了教程中的图片): (加上提示信息即为实际截图) 阅读全文
posted @ 2018-04-02 21:32 何许亻也 阅读(186) 评论(0) 推荐(0)

摘要: 效果如下图: 1 """ 2 This example shows an icon 3 in the titlebar of the window. 4 5 """ 6 7 import sys 8 from PyQt5.QtWidgets import QApplication, QWidget 阅读全文
posted @ 2018-04-02 20:45 何许亻也 阅读(673) 评论(0) 推荐(0)

摘要: 效果如下图: 1 """ 2 In this example, we create a simple 3 window in PyQt5. 4 """ 5 6 # provide the necessary imports. 7 # The basic widgets are located in 阅读全文
posted @ 2018-04-02 20:07 何许亻也 阅读(2243) 评论(0) 推荐(0)