Results 1 to 1 of 1

Thread: Gif as Background for QListWidget or transparent background

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2014
    Qt products
    Qt4 Qt5 Qt/Embedded

    Question Gif as Background for QListWidget or transparent background


    Iam trying to add Gif Image as an background for the QListWidget

    Here is my Part of Code to understand what i have done

    Qt Code:
    1. resize(800,600);
    3. myMovie = new QMovie(":/images/icon_gif.gif");
    4. movieLabel = new QLabel(this);
    5. movieLabel->setMovie(myMovie);
    6. myMovie->start();
    8. listWidget = new QListWidget(this);
    9. listWidget->setViewMode(QListView::IconMode);
    10. listWidget->resize(800,600);
    13. sample->setIcon(QIcon(":/images/shutdown.png"));
    14. sample->setText("Sample");
    15. sample->setTextAlignment(Qt::AlignHCenter);
    17. listWidget->addItem(sample);
    18. listWidget->setItemWidget(sample,movieLabel);
    To copy to clipboard, switch view to plain text mode 

    The Gif image was not displaying in background with the animation that it contains

    and the output is Screenshot.jpg

    OR else how can i make a QListWidget Transparent so that i will be able to see the components that are present behind it.

    Please Guide me,

    Thanks in advance,
    Last edited by gunturrohith; 21st March 2016 at 11:44.

Similar Threads

  1. Replies: 0
    Last Post: 25th April 2014, 08:59
  2. Replies: 4
    Last Post: 27th November 2013, 15:15
  3. Replies: 0
    Last Post: 5th April 2011, 13:36
  4. Replies: 2
    Last Post: 1st April 2011, 09:32
  5. QListWidget transparent background or pixmap
    By wdezell in forum Qt Programming
    Replies: 6
    Last Post: 6th March 2009, 17:53

Tags for this Thread


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.