Validating user input and set button to setEnablet(true)



  • Hi all

    My first post here...

    In my app I have 7 spinboxes where 5 of them have to be valid before I can set the pushbutton to setEnablet(true). Is there a Qt way of doing this, or do I have to manage all of the spinboxes and make my own validation when to enable the button ?

    i.e do I have to catch a signal from the sbinboxes and keep track of who has a value etc. ?

    Thanks in advance
    DarkRoast



  • I would add a SLOT in your MainWindow, void validate(); or something like that.
    And then connect the valueChanged signal of every spinboxes to that slot, and handle the validation there.



  • That's the only senseful way doing this.



  • Thats what I thought, thank you guys!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.