Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QAction Disabled in a Toolbar can not be Checked?
ycyclop last edited by
I added a QAction to a toolbar through a QToolbutton.
Setting the action as checkable enabled me to set it as checked and everything worked great until I wanted to marked it as checked and disabled.
At this point the action was indeed marked as disabled but the checked indication was removed. It looked as if the button is flat. can the checkable state be shown only when the action is enabled?
Thank you for any ideas
andre last edited by
It is actually shown as both checked and disabled, but the only difference is that the contents of the button has been slightly shifted. That is too subtle to notice.
There are two ways around it, and both have disadvantages:
create a proxy style to render the button differently in this case.
use a style sheet do define your own styling.