It could be that something else is changing the enabling state as well, e.g. the file dialog starting with button disabled and enabling it when a file is selected.

What you could try is to intercept the change of the enabling state using an event filter and revert the unwanted change when the event happens.

If you look at the documentation of the enabled property http://qt-project.org/doc/qt-4.8/qwi...l#enabled-prop you see that any change to it is signalled via QEvent::EnabledChanged.

Your event filter would need to know, e.g. through a flag or similar, that it is you that triggered the change and just keep resetting the state to false if the flag is not set.

Cheers,
_