Problem loading multiple GIF images in qtablewidget.
Hi,
I want to load the same GIF image in multiple rows of qtablewidget i have used in my application.
When load the GIF image only in one row it works fine.
but when I try to load it in more than three rows, image did not play until I move my mouse or press any key.
Through the time I move my mouse or keep pressing any key, that image works fine. but it again get stuck if I stop moving the mouse or pressing any key.
Can any one provide me the solution for it or the reason behind it.
Thanks in advance.
Sanket
Re: Problem loading multiple GIF images in qtablewidget.
Can you show how you are using the same image multiple times? Can you post a small, self-contained example that displays the problem?
Re: Problem loading multiple GIF images in qtablewidget.
Ok here is the code. I have put one gif image in my application folder named spinner.GIF".
Now the code to use it in multiple rows is as follows:
QMovie* processingImage;
processingImage = new QMovie(":/images/spinner.gif");
processingImage->start();
lblicon->setMovie(processingImage);
ui->tableWidget->setCellWidget(row, 1, lblicon);
Here processingImage is declared as class variable and lblicon is a QLabel* which is declare as a part of UI.
I have put this whole code in a function and call the function multiple times (precisely the selected rows)
Now the problem is when I select only one row the GIF image works fine but when I select more than 2 rows GIF image got stuck and works only when I move my mouse or press any key.
So please provide any solution for this problem.
Thanks in advance.
Sanket