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. Active QGraphicsView from QGraphicsScene
Qt 6.11 is out! See what's new in the release blog

Active QGraphicsView from QGraphicsScene

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 2 Posters 467 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.
  • DonCoderD Offline
    DonCoderD Offline
    DonCoder
    wrote on last edited by
    #1

    Consider a QGraphicsscene that has multiple views. I wanted to get the view that is currently in focus(i mean a user is currently interacting with). Also is there any way to get current paint engine details from active QGraphicsView Object.

    QGraphicsScene::views() will give me a list but does the active view will be always at 0th position ?

    Pl45m4P 1 Reply Last reply
    0
    • DonCoderD DonCoder

      Consider a QGraphicsscene that has multiple views. I wanted to get the view that is currently in focus(i mean a user is currently interacting with). Also is there any way to get current paint engine details from active QGraphicsView Object.

      QGraphicsScene::views() will give me a list but does the active view will be always at 0th position ?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by
      #2

      @DonCoder

      You dont need your scene for this. Just check which view has focus.

      QGraphicsView * view
      view->hasFocus();
      
      

      or QApplication::focusWidget();


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      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