Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to implement Grid/Dots in Qwidget background
vicky12 last edited by
can any body help me with how to implement this dots or gris form in backround or Qwidget or any other ?
andre last edited by
You could look at how QtDesigner does it, but it seems simple enough to me. Subclass a QWidget, reimplement the paintEvent, and simply fill the widget area with a pattern. You can do that by creating a small QImage in which you draw a single dot, set that image on a QBrush, and use that brush to fill the widget rect with QPainter.
andreyc last edited by
Take a look on "Undo Framework example":http://qt-project.org/doc/qt-5/qtwidgets-tools-undo-example.html they show grid background.
You can do something similar to have dotted background.