PDA

View Full Version : Main Application is crashing



vijayQt
23rd May 2011, 04:15
Hi,
In main application I am using Qlabel Widget to display video. I am using "repaint" to update my QLabel widget. while video running if I am trying to close main application, it's crashing.

Please advise me what is going wrong here?... Do I need to use threads or is there anyway to do it.

Thanks in advance

wysota
23rd May 2011, 06:27
if I am trying to close main application
What other applications besides the "main application" are involved into the process?

vijayQt
23rd May 2011, 06:50
My application requirement is, take local file (.avi, .mpg, etc...) and decode using libavcodec and display pixmap on widget. So I am using QLabel Widget to display the pixmap Image. Other than this I am using decoder function to decode the frames.

So I am using

while (1) {
QImage img;
Qpaint paint;
paint.begin();
paint.draw();
paint.end();
QLabel->setPixmap()
QLabel->repaint()
} to display continues frames.

Anything wrong here?... Please advice

Thanks

wysota
23rd May 2011, 07:12
You are not allowing events to be processed anywhere. Your application can't do anything other than repaint the label.

vijayQt
23rd May 2011, 09:23
Hi Wysota,
Above code is just a sudo code. I am able to play video using above sudo code.
But my problem is, while playing video if I am trying to close main window it's crashing. Why is it so?

Thanks

nish
23rd May 2011, 11:41
did you tried to look at the backtrace?