Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Any signal on QGraphicsView/QGraphicsScene that gets emitted when any element in it is selected?
Forum Updated to NodeBB v4.3 + New Features

Any signal on QGraphicsView/QGraphicsScene that gets emitted when any element in it is selected?

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sairajesh
    wrote on last edited by
    #1

    Do we have any signal that gets emitted automatically whenever any item in the scene gets selected? Or we must listen to mouse events and iterate across all items to see if it is selected or not? Do we have any other better way? Currently, in item's paint() I'm checking if item isSelected() and performing my action, but I want to know, if we have some signal on scene or view to know if any item under it is selected or not.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      steno
      wrote on last edited by
      #2

      QGraphicsScene::selectionChanged is the signal you might be looking for.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved