Which widget to use for a pixel art editor?
Unsolved
General and Desktop
-
I am exploring some functionalities of Qt I never used. I am currently developing a pixel art editor but I do not know which widget is the best for 2D drawing. I have considered to create a widget and embed an OpenGL context inside it.
Based on your experiences, what is the best way to draw 2D graphics with Qt?
Thanks for your answers.
-
A regular QWidget should do just fine. Override the paintEvent, create a QPainter instance and start drawing.
QT comes with a few painting examples you can look at.https://doc.qt.io/qt-5/qtwidgets-tools-plugandpaint-app-example.html
http://doc.qt.io/qt-5/qtwidgets-painting-basicdrawing-example.htmlFound an open-source qt paint app you can check out too:
https://github.com/kkonopko/Paint -
This post is deleted!