PDA

View Full Version : QMdiArea::setViewport and QWidget::paintEvent



NullPointer
15th July 2013, 03:49
Hi all,

I was building my application and I got stuck.
I subclassed a QWidget and implemented the paintEvent, after this, I set this subclass as the viewport of my mdi area.
When I ran, I noticed that the drawings was not ocurring, so I showed the subclass as a window, and the paintEvent was working.
I returned whe subclass as the viewport and added a QPushButton to it, and a message box on paintEvent.
The result was the button showing, but there was no message box at all...

So it seems like paintEvent of the viewport is not called... why?