Keep selection in QGraphicsScene? - qgraphicsscene

In QGraphicsScene, with Ctrl modifier I can select multiple items. But, if I click on blank field on QGraphicsScene (even though I press "Ctrl" Key), it lose it's own previous selection. I want to keep it's selection when I press on "Ctrl" Key, but I don't know how to achieve that. I think that I can change QGraphicsSceneMouseEvent, but it is impossible.
Any helps can be useful.

Related

Distinguish between primary and secondary click

Working with composable in Kotlin.
I have TreeView with Items which are already clickable, but now I need to distinguish between primary and secondary clicks (mouse buttons), but mouseclickable is experimental, so need to check it in another way to open a contextmenu.
Any ideas?

Using Down/Up Arrow key in combo box to select data without updating the data until hitting tab or enter MS Access

when using a filter while typing in a combo box, the UP arrow key and down arrow key are not useful because once you click down/up the data in the combo box is updating and the list narrows down to only the selected item.
is there a way to select data from the combo list without updating the box itself so the up/down key can be used?
I'm using the following code: https://stackoverflow.com/a/59990955/13522629 , to filter my combo box it is very helpful to filter but I'm having the problem with using the up/down arrow keys.
can anyone help with that.
Probably too late to answer. but just for reference.
I have updated the mentioned answer with additional functionality (for reference) to achieve partial search (you can call it google search or fuzzy search.
As I have been searching for the same question with no answer. it looks like the only way to achieve that is to put a text box above the combo box (they become Ultrabox). then you can manipulate the (highlighted) or selected items and only update the text box when the user hits enter or tab.

In IntelliJ IDEA, how do I use the keyboard to highlight an arbitrary checkbox?

For example, if I press Ctrl-Alt-P to extract a parameter, pressing Tab on the resulting dialog box moves directly from "Name" to "Refactor". I know I can work around this by using Alt+key to select a checkbox (e.g., Alt+a for replace all), but as AltGr doesn't work I have to contort my left hand to hit this combination. How do I, using the keyboard, select the first checkbox, so I can use space to change it?
The only way to access the checkboxes in this dialog is via mnemonics (Alt+underlined letter).
There is also an open issue to add tabstops for checkboxes and radio buttons in the refactoring dialogs so that they can be accessed not only by the mnemonics, but also by cycling the components using Tab:
IDEA-154127 Extract refactorings: navigation and mnemonics problems
There is really nothing you can do about it until tabstops are explicitly implemented for these dialogs.

Telerik RadDropDownList loses focus when searching an item by pressing a key that is a label shortcut

I have many controls in a panel. One is a System.Windows.Forms.Label next to a text box, and another control is a Telerik.WinControls.UI.RadDropDownList.
The dropdown list has two items: True and False.
The label has a Text value of "%Type" (so a shortcut there).
When the dropdown list is focused and you press F, the False item gets selected, which is good. But if you press T, without the ALT key down, the focus jumps because of the label shortcut and the text box gets the focus.
Has anyone experienced this behavior or have any idea on how to work around this?
I noticed that the KeyDown event of the dropdown list is being triggered when pressing T but not the KeyUp or KeyPress event. Also, as soon as I remove the & from the label text, everything works fine.
Thanks!

Searching through DataGridView

I have a datagridview with three columns (ID, Name, Address). It's bound to a database that contains around 500 items.
I want to be able to search the gridview for data given in a text box, and then highlight it.
If possible, pressing the Next button should find the next match, and the Reset button should clear all selections (nothing highlighted).
Please advise how to do it.
Thank you very much.
Add a search box and search button in the page. OnClick of the search button, search the datatable for the results and keep the result in the session. then on the bound event of grid, highlight the first row of from the search result set (which can be done by matching the primary/unique key of the table).
You have to handle most of code the manually for this. OnClick of next button, highlight the next row from the search result. again traversing of the search result has to handled manually like keeping the track of current result, moving to next result or moving backward etc.
then on click of reset button clear the search result session and bind the grid again without any highlighted rows.
I don't have code to post for you right now. but i hope if you implement this approach surely your problems will be resolved.