Dear visitor, welcome to QtForum.org.
If this is your first visit here, please read the Help. It explains in detail how this page works.
To use all features of this page, you should consider registering.
Please use the registration form, to register here or read more information about the registration process.
If you are already registered, please login here.
Change button Icon on toggle
Hello, all;
I'm trying to program a QPushButton or QToolButton to change the icon being displayed when toggled/activated. Unfortunately, I'm on a shard system and unable to use QSetIcon or add it to the library. Any suggestions on how to proceed?
Thanks in advance,
Allan
There are some signals you can use and then set your icon in the slot when it gets activated:
QObject::connect(pToolButton, SIGNAL(pressed()), this, SLOT(ChangeIcon( )));
You can use "setStyleSheet".
Great, thanks for the input! I appreciate the assistance.