hello freinds,I have added an background image to a pushbutton ,now when i press this pushbutton,a diffrent image should happen on oushbutton so that the user gets a feel that the button has been pressed..so how shall i do it..
regards
ranjit
hello freinds,I have added an background image to a pushbutton ,now when i press this pushbutton,a diffrent image should happen on oushbutton so that the user gets a feel that the button has been pressed..so how shall i do it..
regards
ranjit
QPushButton has clicked() signal, connect it to a slot and change the image there.
signals and slots docs
You have to subclass QPushButton and do the paint your self. By using QStyledPainter it is not so complicated. Then inside the paint method check for isDown() and react on it.
You can set up different pictures for the several QPushButton states in the Qt designer...
Bookmarks