python pyqt

这里只简单记录一下

安装

pip install PyQt6
pip install pyqt6-tools

第一个Qt程序

#!/usr/bin/python
import sys
from PyQt6.QtWidgets import QApplication, QWidget, QPushButton

def main():
    app = QApplication(sys.argv)
    w = QWidget()
    w.setWindowTitle('Simple')
    btn = QPushButton('Hello PyQt6!', w)
    btn.move(50, 50)
    w.show()
    sys.exit(app.exec())

if __name__ == '__main__':
    main()

参考:

后续案例看

https://www.jianshu.com/p/5f228e586cfd

https://blog.csdn.net/python1639er/article/details/121367380

官方文档

https://www.riverbankcomputing.com/static/Docs/PyQt5/module_index.html

https://www.riverbankcomputing.com/static/Docs/PyQt5/api/qtwidgets/qtwidgets-module.html

其他文档

https://blog.csdn.net/ldgk3ekkd/article/details/126424102

https://www.tutorialspoint.com/pyqt/pyqt_basic_widgets.htm

https://www.pythonguis.com/tutorials/pyqt-basic-widgets/

https://doc.qt.io/qt-5/gallery.html

https://doc.qt.io/qt-5/qtmodules.html

https://doc.qt.io/qt-5/qtwidgets-module.html

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注




Enter Captcha Here :