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. Scrolling QGraphicsView and QGraphicsScene[SOLVED]
Forum Updated to NodeBB v4.3 + New Features

Scrolling QGraphicsView and QGraphicsScene[SOLVED]

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 1.5k 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
    swhweng
    wrote on last edited by
    #1

    Hi,
    I have QGraphicsScene instance set to QGraphicsView on the GUI with scrollbars enabled and full view port update. But when I scroll my graphics view I get the items added to qgraphics scene disappeared on some point, though they are added in code correctly and are expected to be displayed upon scroll ( custom class inherited from QGraphicsItem ):

    @class CSquare : public QObject, public QGraphicsItem@
    One can see how they disappear on application run on this video screen cast:

    "https://www.box.com/s/h4h94x1avgay1crzvyzx":https://www.box.com/s/h4h94x1avgay1crzvyzx

    Can somebody hint what is the problem, how to resolve so the graphics items will not disappear on the view?

    Thanks in advance.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      swhweng
      wrote on last edited by
      #2
      The problem was in custom function in the inherited class:
      
      @QRectF boundingRect() const;@
      
      That should return valid rectangle. Now I fixed that in my project and m going to remove the video.
      
      Thank you very much.
      
      http://realvirtualdevelopment.co.nr. 
      
      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