achille-martin / pyqt-crom

Create cross-platform apps (Android for now) using only Python and the Qt Framework (PyQt5 for now).
MIT License
25 stars 2 forks source link

Feature: add graphics to pyqt5 app #3

Closed achille-martin closed 8 months ago

achille-martin commented 11 months ago

The idea is to generate custom graphics for the pyqt5 app to make it more personal and interactive.

One suggestion is to use QGraphics as detailed on pythonguis website.

achille-martin commented 11 months ago

Another suggestion is to move all graphics to Qt Quick (2) and QML as it is more developed than QGraphics.

However, QGraphics is still very convenient for Standard shapes and the inclusion of QWidgets, as mentioned on the qt blog.

If you want to develop QWidgets and standard Graphics, then go for QGraphics. The performance might even be better, but the look will be very rudimentary (since native).

If you want to develop fancy apps with cool look and feel and you want the latest Qt features, then go for Qt Quick (2).

achille-martin commented 11 months ago

Selecting and moving/dragging an object around in the Scene to a target location might be a fun simple QGraphics application.

Example of code by Learn data and analysis website.

achille-martin commented 9 months ago

Main Window architecture is presented in the PyQt5 GUI book and shown below:

image