23 May 2022
id 996854433does anyone have an example of: ==def selectByFields(model, fields): == using peewee orm?
that seems entirely unrelated to Qt, no?
Replymessage unavailable
Not related to Qt at all... And didn't you post this here earlier already too?
Replymessage unavailable
@boris_
QGraphicsView is likely overkill for what you're trying to do. It provides it's own translation and coordinate system which allows one to draw many thousands of primitives more efficiently than is done with straight Qt Widgets using builtin widgets. However, it is an older API that, while still supported, has mostly been superceded by QML. If you're just trying to display OpenCV in a window with some Qt controls, then QLabel should be fine for that.
You can also do this with QML - and use the Image item.
Doing any sort of drawing where you want to be able to keep track of the drawing elements, zoom in on them, etc.
The main one that Qt uses it for is Qt Charts. Qt Charts is implemented using the graphics view framework. These days if it was reimplemented from scratch, it probably would be implemented using QML.
Qt Charts draws points and lines using QGraphicsItem primitives, and provides the user a means for zooming in and out, changing the style of points, etc.. This is all done by manipulating QGraphicsItems in a QGraphicsScene. You provide a view onto the scene by putting a QGraphicsView into your Qt Widgets app.