You mean a QPainter?
You can't add a QPainter to anything. QPainter is used just to paint on paint devices.
If you want to create a graphical object to substitute the canvas, you can create a QWidget subclass and paint on it.
Regards
You mean a QPainter?
You can't add a QPainter to anything. QPainter is used just to paint on paint devices.
If you want to create a graphical object to substitute the canvas, you can create a QWidget subclass and paint on it.
Regards
Yes, I mean QPainter. Sorry about that. Is creating a QWidget subclass the best way to go? What I am doing is I have three checkboxes that correspond to three different graphs. If two of the boxes are checked then two of the graphs are drawn. If all three boxes are checked then all three graphs are drawn. I decided to use QPainter instead of canvas because of issues with the scaling and drawing the lines in canvas was getting problematic. Could there be a better way of doing this than using QPainter?
Thanks
But you don't understand.
You must use QPainter *AND* QWidget. You use the painter to draw on the widget. That is the only way. What would you do with a QPainter alone?
And subclassing QWidget shouldn't be a problem.
Bookmarks