About a PyQt example program

前端 未结 3 352
感情败类
感情败类 2021-01-17 19:27

I\'m currently need GUI library for a project. I\'m familiar with python and found PyQt might be a good choice.

I\'m reading a tutorial about PyQt, and quite confuse

3条回答
  •  时光说笑
    2021-01-17 19:46

    app.exec_() starts the qt main loop, which ends when every created widget is destroyed (e.g. by closing its window). The paintEvent function is a method that you can overload from a QWidget subclass like the given Example class, which gets called when QT displays, updates or repaints the Widget.

    You can look up these things in the Qt documentation or the PyQt Documentation (which is mostly just a copy of the QT Documentation in a different format, but sometimes contains some valuable information regarding PyQt-specific things).

提交回复
热议问题