i have pushbutton background image gets changed regularly according packets ui receives serial. when user clicks button, becomes red borders.
pb_jack1up ->setstylesheet("qpushbutton {border-image: url(:/arrowkey/up_default.jpg); } qpushbutton:focus {border-width: 1px;border-style: solid; border-radius: 4px;}");
now, want give button effects, make user understand button clicked. make button go inside when clicked, , when user releases button border shall no longer set anymore. however, in case button border remains. cannot set style sheet pressed , released slots, because background image depends on receive serial.
could me please?
you can use:
qpushbutton { ... } qpushbutton:disabled { ... } qpushbutton:pressed { ... } qpushbutton:focus { ... } qpushbutton:hover { ... }
or take @ this blog entry.
Comments
Post a Comment