Results 1 to 4 of 4

Thread: How to add two icons/images to the same QPushButton??

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2011
    Posts
    23
    Qt products
    Qt4
    Platforms
    Symbian S60 Maemo/MeeGo

    Default How to add two icons/images to the same QPushButton??

    Hi,
    How to add two icons/images to the same QPushButton.
    ie, i want to add one icon with alignment left and another in the center besdes to the text ??
    i'm doing the following but it shows only one icon
    Qt Code:
    1. championbtn=new QPushButton;
    2. championbtn->setText("any");
    3. championbtn->setIcon(QIcon(":/images/DEFAULT-LOGO.png"));
    4. championbtn->setIcon(QIcon(":/images/CLOSE.png"));
    5. championbtn->setIconSize(QSize(31,31));
    To copy to clipboard, switch view to plain text mode 
    thanks
    Ram
    Last edited by wysota; 1st April 2011 at 13:12. Reason: reformatted to look better

Similar Threads

  1. How to show images from database as icons in QListView
    By LeshaS in forum Qt Programming
    Replies: 2
    Last Post: 21st January 2011, 07:13
  2. Using QStyle for QPushButton with 3 background images.
    By suslik in forum Qt Programming
    Replies: 1
    Last Post: 9th July 2010, 05:42
  3. Images/icons. It's not displayed
    By LMZ in forum Qt Tools
    Replies: 37
    Last Post: 18th May 2007, 14:55
  4. Replies: 3
    Last Post: 26th September 2006, 12:16
  5. SVG icons on a QPushButton?
    By Kumula in forum Qt Programming
    Replies: 2
    Last Post: 22nd May 2006, 21:03

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
  •  
Qt is a trademark of The Qt Company.