Hi ram4soft,
Instead of you can merger two images and then apply them to the pushbutton
The syntax can be like this...
QPixmap firstImage
(":/QTTestProject/images/Image-01.png");
//qrc path QPixmap secondImage
(":/QTTestProject/images/Image-02.png");
//qrc path
painter.drawPixmap(0, 0, firstImage);
painter.drawPixmap(firstImage.width(), 0, secondImage);
dummyIcon.addPixmap(comboPixmap);
championbtn->setIcon(dummyIcon);
QIcon dummyIcon;
QPixmap comboPixmap(50, 25);
QPixmap firstImage(":/QTTestProject/images/Image-01.png"); //qrc path
QPixmap secondImage(":/QTTestProject/images/Image-02.png"); //qrc path
QPainter painter(&comboPixmap);
painter.drawPixmap(0, 0, firstImage);
painter.drawPixmap(firstImage.width(), 0, secondImage);
dummyIcon.addPixmap(comboPixmap);
championbtn->setIcon(dummyIcon);
To copy to clipboard, switch view to plain text mode
Note: Set the comboPixmap size based on the "Image-01.png" and "Image-02.png".
Bookmarks