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. Scroll bar follow the QGraphicsitem
Qt 6.11 is out! See what's new in the release blog

Scroll bar follow the QGraphicsitem

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.2k 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.
  • E Offline
    E Offline
    erfan71
    wrote on last edited by
    #1

    Hi,
    I have a QgraphicsItem that i can Move it with mouse ,
    I am using Qgraphicsscene and QgraphicsView for that ,
    the problem is when i Move it in the Corner of the screen , Scroll bar start to move, but i can't see the Item . any more!!!
    Now, to see the Item i must manually drag the Scroll bar !!!!!!!!!!
    How can i do that , to always see the Item , ???
    in other word , Scroll bar moves with the Item ....

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

      You may need to monitor the item movement explicitly using QGraphicsItem::itemChange(), and some how find out the view which it caused to move and for that view call QGraphicsView::ensureVisible()

      I don't think there is a stright forward solution.

      SS

      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