from PyQt5.Qt import /nimport sys/nimport os/n/nclass helloworld(QWidget):/n def init(self):/n super().init()/n self.InitUi()/n /n def InitUi(self):/n self.setWindowTitle('垃圾清理')/n self.resize(700, 500)/n self.move(1, 1)/n /n self.mybutton = QPushButton(self)/n self.mybutton.setText('清理TEMP文件以及系统使用痕迹垃圾')/n self.mybutton.move(1, 1)/n /n self.mybuttonQT = QPushButton(self)/n self.mybuttonQT.setText('关于PyQt')/n self.mybuttonQT.move(1, 25)/n /n self.mybuttontwo = QPushButton(self)/n self.mybuttontwo.setText('联系作者,提出建议')/n self.mybuttontwo.move(1, 50)/n /n self.mybuttonthree = QPushButton(self)/n self.mybuttonthree.setText('关于软件')/n self.mybuttonthree.move(1, 75)/n /n self.eggbutton = QPushButton(self)/n self.eggbutton.setText('彩蛋')/n self.eggbutton.move(1, 100)/n self.eggbutton.hide()/n /n self.mybutton.clicked.connect(self.clean_temp)/n self.mybuttonQT.clicked.connect(self.about_QT)/n self.mybuttontwo.clicked.connect(self.about_author)/n self.mybuttonthree.clicked.connect(self.about_software)/n self.eggbutton.clicked.connect(self.show_egg)/n /n self.i = 0/n /n def clean_temp(self):/n os.system(r'del %TEMP%/ /q')/n os.system(r'del C://Windows//SoftwareDistribution//Download//* /q')/n os.system(r'powercfg -h off')/n self.i += 1/n self.show_egg()/n /n def about_QT(self):/n QMessageBox.information(self, '关于PyQt', 'PyQt is a GUI widgets toolkit. It is a Python interface for Qt, one of the most powerful and popular cross-platform GUI libraries. PyQt was developed by RiverBank Computing Ltd. The latest version of PyQt can be downloaded from its official website − riverbankcomputing.com.PyQt API is a set of modules containing a large number of classes and functions. While QtCore module contains non-GUI functionality for working with file and directory, etc., QtGui module contains all the graphical controls. In addition, there are modules for working with XML (QtXml), SVG (QtSvg), and SQL (QtSql), etc./n/n/nPyQt是一个GUI小部件工具包。它是Qt的Python接口,Qt是一种功能强大且流行的跨平台GUI库。PyQt由RiverBank Computing Ltd开发。最新版本的PyQt可以从其官方网站riverbankcomputing.com下载。PyQt的API是一组包含大量类和函数的模块。QtCore模块包含用于处理文件和目录等非GUI功能,QtGui模块包含所有图形控件。此外,还有用于处理XML(QtXml)、SVG(QtSvg)和SQL(QtSql)等的模块。')/n self.i += 1/n self.show_egg()/n /n def about_author(self):/n QMessageBox.information(self, '·联系作者', '1708213363@qq.com或69gg7tjb@gmail.com')/n self.i += 1/n self.show_egg()/n /n def about_software(self):/n QMessageBox.information(self, '关于软件', '1708213363@qq.com')/n self.i += 1/n self.show_egg()/n /n def show_egg(self):/n if self.i == 4:/n while True:/n QMessageBox.information(self, '彩蛋', '这是一个彩蛋!/n/n关不掉的彩蛋!')/n /nif name == 'main':/n app = QApplication(sys.argv)/n w = helloworld()/n w.show()/n sys.exit(app.exec_())/n

PyQt 垃圾清理工具 - 清理TEMP文件和系统使用痕迹

原文地址: https://www.cveoy.top/t/topic/qcTy 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录