PDA

View Full Version : No paintEvent is called



HeReSY
26th January 2011, 15:43
Hi to all,

we have a serious problem to display a video on a widget.
We have a
MainWindow(public QMainWindow)
|
|--> VideoWidget(public QWidget)
|
|--> MainMenuBar(public QWidget) with transparent Buttons and Labels
|--> Statusbar (public QWidget) with transparent Buttons

After displaying some Video, this could be some Minutes or many hours, the paintEvent()-Function isn't called correctly. When it is called, it didn't update the widget correctly. Only parts of it will be updated. So it isn't possible that the paintEvent isn't called, why the widget is not visible. The rect from the widget is also correct, and the the flag setUpdateEnabled is set to true.
So, what else can happen, that the paintEvent isn't called.

HeReSY

franz
26th January 2011, 17:06
Try setting Qt::WA_OpaquePaintEvent to true.

It would be very useful if you could share some code that reproduces this issue. (fully working example -- it will get you the highest chance of proper help)

high_flyer
26th January 2011, 17:11
This smells very much as a thread related problem.
If this application is threaded, and you are updating your frame from a thread, something there is not done right.
You either run in to a deadlock, or race condition or similar.