I am rewriting a bit of code where there use to be a canvas and I am replacing it with a paint object. When I added the canvas to my gui all I had to do is tb->addWidget(canvas), where tb is a vertical layout. When I try to add the paint object to tb I get the error no matching function for call to ‘QHBoxLayout::addWidget(QPainter*&). I was wondering how would I add the paint object to tb where the canvas use to be.

When I say paint object, I mean QPaint paint. Not sure what the terminology is here. I am very new to QT.

Sorry if this is confusing to anybody.

Thanks