Results 1 to 2 of 2

Thread: Undoing radio button checks.

  1. #1
    Join Date
    Jan 2006
    Location
    Berkeley California
    Posts
    109
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Undoing radio button checks.

    I have a group of radio buttons and there are instances where I do not have A Priori knowledge of whether that given selection is valid when pressed. When a button is pressed, if at that moment it is not valid I need to set a different radio button true. What would be the best way to do this without creating a flurry of signals? Is disabling and then re-enabling the radio buttons' signals the way to do it?

    Thanks
    Doug Broadwell

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Undoing radio button checks.

    What would be the best way to do this without creating a flurry of signals? Is disabling and then re-enabling the radio buttons' signals the way to do it?
    Why do you think such a situation will generate a "flurry of signals"?
    Just connect the toggled() or clicked() signal to an evalutation slot, which will validate the buttons state, and turn on that other button if needed.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.