Results 1 to 1 of 1

Thread: Gif as Background for QListWidget or transparent background

  1. #1
    Join Date
    Nov 2014
    Posts
    54
    Thanks
    5
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11

    Question Gif as Background for QListWidget or transparent background

    Hi

    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);
    2.  
    3. myMovie = new QMovie(":/images/icon_gif.gif");
    4. movieLabel = new QLabel(this);
    5. movieLabel->setMovie(myMovie);
    6. myMovie->start();
    7.  
    8. listWidget = new QListWidget(this);
    9. listWidget->setViewMode(QListView::IconMode);
    10. listWidget->resize(800,600);
    11.  
    12.  
    13. sample->setIcon(QIcon(":/images/shutdown.png"));
    14. sample->setText("Sample");
    15. sample->setTextAlignment(Qt::AlignHCenter);
    16.  
    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,
    Rohith.G
    Last edited by gunturrohith; 21st March 2016 at 12:44.

Similar Threads

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

Tags for this Thread

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.