I am having a difficult time overloading QTreeWidgetItem's < operator.
I have a list of QTreeWidgetItems, some top-level items and some children. When the user activates the "date created" column to sort the tree, the sort occurs at the child level.
In other words, imagine a tree like this:
Item A - latest modification 9/24/12
3rd Modified - 9/21/12
2nd Modified - 9/15/12
1st Modified - 9/10/12
Item B - latest modification 9/23/12
2nd Modified - 9/23/12
1st Modified - 9/22/12
When the date column is activated to sort ascending, I would expect the return result to be: Item A, then Item B... but instead, the sort occurs on the 1st modified date of the item. I am returned with Item B then Item A. Even though none of the top-level items are expanded, or active.
If you use a QWidgetTree to dispay your QTreeWidgetItems list :
You can add your 2 firsts level item (item A and B), sort your QwidgetTree and then add your low level items.
so your tree will be sorted by latest modification
Related
I have two select list : A and B.
A is the parent LOV of B. So when A changes B gets refreshed and changes based on the value of A.
--> B now has lower values to chose from.
Now my problem is that when I select values via PL SQL into the select list (from the database) that select list B never returns the wanted value but the values I would get when I choose the value from A.
--> B should be set to John and A should be set to IT.
--> B returns null value but I can choose all people that work in IT.
When I remove A as Parent LOV then the right value is inserted into B but the list dosent adapt to A.
I use Oracle APEX v.19.1.0.00.15
So I tried it out myself.
I had a button that triggers a Dynamic action. The action was PLSQL code and it just assigned the parent and child. If I set it to assign both of them in the same action, it didnt work, if I separated them out it did.
So change out the actions in your DA(dynamic action) first you have a PLSQL action that assigns the parent item, and you also need to set the Items to return to return this item. Then you have a second action that is the same thing, just for the child.
This works for me, so I am hoping it works for you, let me know if it is still causing you issues
bootstrap-typeahead for add multiple items to a list.
https://github.com/ericgio/react-bootstrap-typeahead
I need to pick the value, when I remove an item from the list.
onChange event of the AsyncTypeahead handling the event when removing and adding items to the list.
When an item removed, selected data updating with the existing values in the list.
Eg: I have 3 items in the list, I am removing an item, Then the selected list containing existing items. (2 items)
In my project I want to get that removed item, at the time of removing.
Is there any functionality for pick that removed value in "onChange" event.
I had the same problem, and I get it sorted in this way:
Compare your current selected items with the selected items that you had before onchange.
eg:
const removedItem = this.state.alradySelectedItems.filter(value => !selected.includes(value));
In Blue Prism, after traversing the rows of collection using a loop, if any column is referenced to take first value of that column using CollectionName.ColmName, I am getting error saying "The collection has no current rows." although row count of collection is greater than 1.
How can I set the cursor back to the first row or any other way to get first value of a column?
Your misunderstanding lies in the details (emphasis mine):
Collection has no current row
After looping over a collection, you'll notice that the collection in the page will simply show the number of rows currently contained within a collection instead of the usual "Row X of Y". This state indicates that Blue Prism's internal pointer isn't looking at one row in particular.
Once you've reached the end of a collection within a loop, you could use the beginning Loop stage to reset the internal counter to 1
I'm includinig a GIF demonstration below to help illustrate my test case:
You could use “Read Collection Field” from “Utility – Collection Manipulation” VBO. This action allows you to get value from any column & any row from your collection. As an input you need to provide:
Collection
Field Name (Column Name)
Row Index
If you don’t have this VBO you can find it in your Blue Prism installation folder in VBO subfolder.
I have unique QTreeWidgetItems in QTreeWidget, I am using findItems() to find a specific item, it returns list of items. From this list taking the first item and storing in QTreeWidgetItem. but i wonder is there any method to find an item which returns only one item, if found ?
I wonder if it is possible to select item that belongs to one group, without selecting whole group.
What I trying to make is a group of items, that can be moved (all items are moved together) but none of them can't be moved individually. But I want also to be able to select items inside this group and then do something with them, like reordering, deleting, changing their color, etc.
The other problem is, there can be group of groups. I wish also to be able to select these groups inside parent group. I was thinking that this could be problem, because we are not able to determine which group users want to select. For demonstration purpose, lets say that we have graphic's scene composed of following items:
Group A which contains group B. The group B contains 3 lines.
If I press double click on group A, then I am then able to select group B. If I again press double click on B, then I am able to select lines inside group B. Pressing Esc does opposite as double click. The problem is, I have no idea how to do that, because all selection is routed to the parents, and than back to all its children.
You can't use QGraphicsItemGroup to do this because selecting one item in a group automaticaly selects all other memebrs of the group.
I'd subclass QGraphicsItem to create a 'RootItem' class. This class would contain two lists. One is a list of ordinary QGraphicsItems that make up the visual elements of the group itself, parented to this RootItem. The other list is of other RootItems that are parented to this one (e.g. Group B).
You would just need to make sure that you carefully controlled which items are selectable at any one time and how the interactions propagate between items.
Hope this helps.