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. Why QGraphicsItems dissapear once touching or approach viewport bounds?

Why QGraphicsItems dissapear once touching or approach viewport bounds?

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 189 Views
  • 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.
  • clostridium_difficileC Offline
    clostridium_difficileC Offline
    clostridium_difficile
    wrote on last edited by
    #1

    I've got a problem. When graphics item cross, touch or sometimes just approach, to viewport bounds it dessapears. This happens when item is moved over scene or zooming view. How to stop this behavior?

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Test with Diagram example and see if you can reproduce it.
      https://doc.qt.io/qt-5/qtwidgets-graphicsview-diagramscene-example.html

      If not, it means its in custom code and its not something we just guess.
      It could be some of your overrides or other logic. Missing call to base class or
      similar. :)

      1 Reply Last reply
      1
      • clostridium_difficileC Offline
        clostridium_difficileC Offline
        clostridium_difficile
        wrote on last edited by clostridium_difficile
        #3

        I noticed that, problem is perhaps with items' boundingRect. Now, it returns mapped to scene rect(), but when it's not mapped, it works good.

        mrjjM 1 Reply Last reply
        0
        • clostridium_difficileC clostridium_difficile

          I noticed that, problem is perhaps with items' boundingRect. Now, it returns mapped to scene rect(), but when it's not mapped, it works good.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi
          Well maybe the boundingRect is in local coordinates and
          not global as i assumed in the other post.
          The samples does not map to scene.

          1 Reply Last reply
          1

          • Login

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