QGraphicsItem
itself uses QPainter
for drawing, so your question is ill-formed.
Qt offers 3 different APIs for graphics - QWidget
based, QGraphicsScene
stack based and QtQuick
based.
QWidget
is for "typical" GUI rectangular elements, buttons, checkboxes, drop down menus and whatnot. Widgets are QObject
derived so you get signals/slots and such. It is optimal for typical user interface items, not so much for custom graphics, although they are still completely possible to implement.
QGraphicsScene
as the name implies, is a graphics scene, you can scroll, scale, rotate the scene, the scene and the view are separate objects, drawing itself is identical to widgets, but the paradigm is not the typical for widgets "draw a GUI", also QGraphicsItem
itself is not QObject
derived, so you don't have the signals/slots and such, although you can use QGraphicsObject
if you need them. The regular graphics item is more lightweight, supports LOD drawing and some extra functionality not part of the widgets API. There are a few stock graphics items such as lines, rectangles and whatnot, similar to how there are stock widgets, for everything custom, you have to implement your own painting using QPainter
, just like with widgets. Being more lightweight and supporting LODs, you can have a significantly higher object count than widgets.
QtQuick
is the most recent graphics API, available since Qt5, it uses QML rather than C++, and is very easy and fast to develop and prototype in it. Animations and custom graphics elements are fastest and easiest to implement with QML. It can be extended with custom C++ types, including graphics items, either using QPainter
or the QML scenegraph API, the latter of which is a little more complex to extend. You also have a Canvas
element, which has an API similar to QPainter
which you can use directly. This API is heavier than the graphics scene, even heavier than the widgets because of the extra functionality, but thanks to the scenegraph, graphics performance is usually much better than widgets or the graphics scene, even if you combine them with OpenGL.