ToddAtWSU
31st January 2007, 15:01
I have a QTable (Qt 3.3.7) in which the user can click checkboxes to hide and show different rows in the table. The user can also select multiple rows inside the table and do things with those rows by clicking different buttons. The problem I am having is occuring with the selecting of these rows. Here is an example of what is happening:
The user has 30 rows showing and clicks a checkbox that hides all the odd-numbered rows. So the user now has 15 rows showing and selects all of these by clicking and dragging from the first one down to the last one. The first problem is this also selects all the hidden rows between rows 2-30 where I just want the visible rows to be selected. I connected the selectionChanged( ) SIGNAL to a SLOT I created called changeSelection that went through and said if the row was selected and the row was not visible, then remove the selection for that row. This works fine until I click the checkbox to show all the odd-numbered rows. Upon doing this, the rows I now tell to show also appear as selected. I want these rows to stay un-selected whenever I tell them to re-appear.
What do I need to do to ensure these rows stay un-selected upon making them re-appear? :confused: Thanks for all your help!!
The user has 30 rows showing and clicks a checkbox that hides all the odd-numbered rows. So the user now has 15 rows showing and selects all of these by clicking and dragging from the first one down to the last one. The first problem is this also selects all the hidden rows between rows 2-30 where I just want the visible rows to be selected. I connected the selectionChanged( ) SIGNAL to a SLOT I created called changeSelection that went through and said if the row was selected and the row was not visible, then remove the selection for that row. This works fine until I click the checkbox to show all the odd-numbered rows. Upon doing this, the rows I now tell to show also appear as selected. I want these rows to stay un-selected whenever I tell them to re-appear.
What do I need to do to ensure these rows stay un-selected upon making them re-appear? :confused: Thanks for all your help!!