QtMacExtras - How to disable item in a toolbar.
I am using QtMacExtras for native toolbar in my app. Does anybody knows how to disable button in a toolbar?
Using standard method some_action->setEnabled(false) does not work, the button in toolbar for that action remains "clickable".
Here is the relevant piece of code
toolBar = new QMacNativeToolBar(this);
myAction = toolBar->addAction(QIcon(":/qtlogo.png"), "Disabled action");
I think that the mac native toolbar is still far from a fully functional component. For instance, it does not support item groups, you cannot remove items, &c. Looking into its code, it appears that an action's changed() signal is never connected, it even seems that QMacNativeToolBar assumes that all of its actions are enabled regardless of their state. Which means, we probably have to implement this functionality ourselves or wait until somebody else does ;-).
I thought as much. Thank you for clarification.