I’ve figured out how to use QPainter to draw rectangles. Now I want to have a drawing area where if the user clicks, a 1×1 rectangle is drawn where the mouse pointer is. To accomplish this, I assume I need a transparent Qt widget that supports the clicked() signal.
How do I make such a transparent widget? Or is there something else I can use? Perhaps I can only use the window’s clicked() signal?
You don’t really need a transparent widget?
All you have to do is implement
for your widget and draw your rectangle.
Take a look at scribble example that comes with Qt.