Results 1 to 3 of 3

Thread: Problem loading multiple GIF images in qtablewidget.

  1. #1
    Join Date
    Aug 2010
    Posts
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default 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

  2. #2
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default 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?

  3. #3
    Join Date
    Aug 2010
    Posts
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default 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

Similar Threads

  1. Loading corrupt jpeg images with QImage
    By mikeee7 in forum Qt Programming
    Replies: 15
    Last Post: 3rd December 2010, 01:59
  2. Slow loading images
    By abbapatris in forum Qt Programming
    Replies: 10
    Last Post: 5th March 2008, 15:52
  3. Loading images in html in a QTextBrowser
    By BasicPoke in forum Newbie
    Replies: 1
    Last Post: 6th June 2007, 21:51
  4. Loading images in QTextBrowser
    By nisha0609 in forum Qt Programming
    Replies: 1
    Last Post: 3rd January 2007, 09:44
  5. Replies: 10
    Last Post: 1st February 2006, 10:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.