Results 1 to 5 of 5

Thread: Processing multiple checkboxes

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Wiki edits
    17

    Default Re: Processing multiple checkboxes

    Quote Originally Posted by -Kyr0s- View Post
    My function checks whether the checkbox is enabled, and if so, send the bytes. However, it only seems to work when using one checkbox at a time. I want to be able to select all of them, so all four functions are processed, and thus, all four LEDs go on (or off).
    Nothing in that code would appear to turn LEDs off (assuming dioX_enabled() turns them on).
    Any suggestions? I can't seem to see why it does that.
    You have never initialised the bools, so they contain whatever rubbish data is in the memory location allocated to them until you set them.

  2. #2
    Join Date
    Oct 2011
    Location
    Netherlands
    Posts
    13
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Windows
    Thanks
    7

    Default Re: Processing multiple checkboxes

    Quote Originally Posted by ChrisW67 View Post
    Nothing in that code would appear to turn LEDs off (assuming dioX_enabled() turns them on).
    That's correct, yes. I've not used the dioX_disabled() functions as of yet, as I want to make sure that dioX_enabled() works before doing so. I use another app (not made by me) to disable the LEDs in-case needed.
    You have never initialised the bools, so they contain whatever rubbish data is in the memory location allocated to them until you set them.
    I'm not quite sure what you mean. I want to be able to select or deselect them when connecting, without having set them to enabled – they need to be unchecked by default when starting the application/connecting.

    I've tried however, to do so as you suggested, but the same issue occurs: only one is being processed – so, for instance, it's not possible to select all four of them, and enable all LEDs. Only the first is being turned on (or the second, third, fourth; just as long as it's only one checkbox).

Similar Threads

  1. Event Processing
    By QbelcorT in forum Qt for Embedded and Mobile
    Replies: 10
    Last Post: 15th April 2009, 23:48
  2. Image Processing using Qt
    By danielperaza in forum Qt Programming
    Replies: 2
    Last Post: 9th March 2008, 18:15
  3. XML processing instruction
    By mattia in forum Newbie
    Replies: 1
    Last Post: 26th February 2008, 11:37
  4. checkboxes
    By abrou in forum Newbie
    Replies: 2
    Last Post: 1st February 2008, 18:52
  5. QTreeView with checkboxes
    By shad in forum Qt Programming
    Replies: 1
    Last Post: 4th May 2006, 13:29

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.