The Selected
property of the GraphicsItem
class indicates whether the graphics item is currently selected. This property is a boolean value, where true
means the item is selected, and false
means it is not.
The Selected
property of the GraphicsItem
class indicates whether the graphics item is currently selected. This property is a boolean value, where true
means the item is selected, and false
means it is not.
Use the Selected
property to check if a GraphicsItem
is selected or to set its selection state. This can be useful for implementing selection logic in a graphical editor or UI application.
// Example of using the Selected property // Assume 'item' is an instance of GraphicsItem if (item.Selected) { // Perform actions when the item is selected item.Highlight(); } else { // Perform actions when the item is not selected item.Dim(); } // Set the item as selected item.Selected = true;