Deselect row in QTableWidget when clicked for a second time - qt

I have QTableWidget::selectionMode - SingleSelection, QTableWidget::selectionBehavior - SelectRows. So user selects rows via single click. However, when clicking the same row again, it isn't deselected. How to implement such deselection?

Related

looking for plsql code based on oracle apex layout design

I have created a hidden item "P1_DOCUMENTS_COUNT" with default of 1. used plsql too increase it when users clicks the button "add row". Created 10 times the following row of items (# for the row number): P1_DOC_DATE_#, P1_DOC_DESCRIPTION_#, P1_DOC_NAME_#, P1_DOC_CATEGORY_#, P1_DOC_FILE_BROWSER_#. at the beginning - rows 2-9 will be hidden. when P1_DOCUMENTS_COUNT = n, show rows 1,2,...n.
Issue is I have cancel button on each row, I am looking for a solution so that if none of cancel button clicks then 1 by 1 clicking add row it shows all 10 rows but if cancel button gets clicked in the middle then that row should also appear by clicking add row. hope i clear my point.
for more info please check url: Multiple conditions on single button with Dynamic Action in Oracle Apex
Instead of braking your head on it - just change the "cancel" button to a "clear" button and empty the contents of the items without hiding the row.
alternatively - create an array of size 10 and keep the information on what's been clear in it
Create 9 hidden Items with default value of 0 (these are supposed to be hidden at the time when page loads)
Now on each click of Add Row button perform PLSQL code to check whether the Row is showing of 6 Items if not then change the value of hidden item to 1 and those row will be showing.
NOTE:- There are separate DA to show and hide items, 6 Items of row based on the value on hidden items.

Adobe Captivate: Prevent states from looping back to the beginning

Using Adobe Captivate 9. I have a text box which changes states to show different info on a single slide.
On the slide there is a forward and back button which changes the state of the text box. When clicking the next button on the last state it goes back to the first state. Is there a way to prevent this? Or hide the next button when on the final state.
You can build an advanced action to control moving through the state. First creat a variable that equals 0. Second create an advanced action that adds 1 to the variable each time you click the the next button to move through the state (-1 for the previous button). On a new tab in the advanced action, create a conditional action (if variable = number of clicks to get to last state, then hide button). Do the same for the previous button (if variable = 0, then hide previous button). You will also want one to show the buttons (if variable is not equal to 0, then show previous button) and (if variable is not equal to number of clicks, then show next button).

In a QTableView how to check if the the whole row was selected (by clicking on the horizontal header)?

I have a QTableView with a model where not all the cell is selectable. I want to execute some code if the user selected the whole row by clicking on the horizontal header and not just by selecting a cell.
I looked around the QTableView selected methods and HorizontalHeader methods like:
horizontalHeader()->selectionModel()->hasSelection()
But that gives true even if only one cell was selected. I don't see how to check if the whole row is selected.
Any idea is appreciated.

How to be notified when the user clicks in the tableview below the last row?

When the user clicks in a tableview on a row, the events (clicked, activated, pressed, etc) are fired. So far so good.
When the user clicks below the last row (when the tableview is bigger than required to display all the rows) I don't know how to be notified:
the selectionModel()->currentChanged() is not fired.
Visually, the currentRow seems to lose the focus, but at this time the tableView->currentIndex() indicates the last clicked row.

GXT grid button selects row

I have a grid where a button on each row deletes the row upon clicking (with a confirmation), but when the button is clicked, the row is also selected, performing the actions in onRowClick(..) method together.
How can I have the button such that clicking it does not results in selecting the row item?
The click handler for your button should call DomEvent.stopEvent. The doc (2.2.4) is here: http://www.sencha.com/gxtdocs/#com.extjs.gxt.ui.client.event.DomEvent-stopEvent%5B0%5D

Resources