How to set the QToolButton's icons using style sheet?
I would like to set a QToolButton's icons using style sheets, like this : #include <QToolButton> #include <QApplication> QString FormStyleSheetString( const QString & name ) { const QString thisItemStyle( "QToolButton:enabled { image: url(" + name + "_normal.png); } " "QToolButton:pressed { image: url(" + name + "_pressed.png); } " "QToolButton:disabled { image: url(" + name + "_disabled.png); } " ); return thisItemStyle; } int main(int argc, char * argv[]) { QApplication qapp(argc,argv); QToolButton button; button.setStyleSheet( FormStyleSheetString( "button" ) ); button.setToolButtonStyle(Qt