Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QT 5.4 - Need to disable a button on Toolbar
Dragon123 last edited by
I need some help.
I've been trying to figure this out for a few week but I can't seem to find the solution.
I have an application with multiple pages, so I am using QStackedWidgets. What I would need to do is disabling a button on the toolbar of the application when I am on a certain Index.
For example on Index 0 and Index 6 I would need for a button on my toolbar to be disabled.
How can I manage to do this?
Hi and welcome to devnet,
Add a slot in the widget containing the toolbar and connect QStackedWidget::currentChanged to it. In the slot check the index value and enable/disable the button.
Hope it helps