QPushButton with colored rectangle embedded and text inside on side of Rectanlde
-
Hi All,
I want to implement a QPushButton with colored rectangle inside it and text inside on side of Rectangle . If I click on button , then QColorDialog should come up and what color I choose in the QColorDialog then the same should be there in rectangle in th QPushButton. Can someone help me get some tips for the same -
Hi
you can create your own button and paint it
http://qt-articles.blogspot.dk/2010/06/how-to-customize-button-in-qt.htmlOr you can paint on pixmap and just set the pixmap to the button as icon.
-
KColorButton class from KDE's KWidgetsAddons is what you are after