Maybe I didn't explain myself well. There are already a slot that change the max value anytime the combobox is changed. Our problem was that when you open the mapOptionsPage the maximum value was 21 because it is the value set when the spinbox was created and that will only change if we change the combobox.

So what I have done was to verify which mapProvider the mapOptionsPage is loading and if it is UserImage I set the maximum value to 32. Whenever the user change the combobox the on_providerComboBox_changed() slot will be called and change the maximumvalue if the new mapProvider isn't UserImage.