Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. In which cases does QGraphicsScene::render not work?
Qt 6.11 is out! See what's new in the release blog

In which cases does QGraphicsScene::render not work?

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 1.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.
  • R Offline
    R Offline
    RoApPr
    wrote on last edited by
    #1

    And again, good day to everyone!
    Can anyone tell under what conditions the procedure scene->render(...) won't do anything?
    I observe a number of situations when, with a completely correct "input", the rendering of the specified area simply does not occur, although there are objects to draw (thousands of polygons) (and the execution time of the render() operation takes 0.0 ms).
    If no one has any ideas offhand, then I will give a clipping from the code demonstrating the problem.
    Thank you in advance for any help!

    JonBJ 1 Reply Last reply
    0
    • R RoApPr

      And again, good day to everyone!
      Can anyone tell under what conditions the procedure scene->render(...) won't do anything?
      I observe a number of situations when, with a completely correct "input", the rendering of the specified area simply does not occur, although there are objects to draw (thousands of polygons) (and the execution time of the render() operation takes 0.0 ms).
      If no one has any ideas offhand, then I will give a clipping from the code demonstrating the problem.
      Thank you in advance for any help!

      JonBJ Online
      JonBJ Online
      JonB
      wrote on last edited by
      #2

      @RoApPr said in In which cases does QGraphicsScene::render not work?:

      with a completely correct "input"

      Are you passing target or source rectangles? If you are, you are quite certain they are correct? That would be my first thought.

      R 1 Reply Last reply
      0
      • JonBJ JonB

        @RoApPr said in In which cases does QGraphicsScene::render not work?:

        with a completely correct "input"

        Are you passing target or source rectangles? If you are, you are quite certain they are correct? That would be my first thought.

        R Offline
        R Offline
        RoApPr
        wrote on last edited by
        #3

        @JonB said in In which cases does QGraphicsScene::render not work?:

        If you are, you are quite certain they are correct?

        Yes, I use them, and I am absolutely sure of their correctness. BUT, even if this is not the case, I manually checked some of their correct values, at which rendering also does not occur.

        JonBJ 1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Can you provide a minimal compilable example that shows that issue ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          R 1 Reply Last reply
          0
          • R RoApPr

            @JonB said in In which cases does QGraphicsScene::render not work?:

            If you are, you are quite certain they are correct?

            Yes, I use them, and I am absolutely sure of their correctness. BUT, even if this is not the case, I manually checked some of their correct values, at which rendering also does not occur.

            JonBJ Online
            JonBJ Online
            JonB
            wrote on last edited by
            #5

            @RoApPr
            Fair enough. Are you able to test whether if you do not pass in any rectangles (so whole scene) these objects do show? Then we know it seems to be a source rectangle issue.

            R 1 Reply Last reply
            1
            • SGaistS SGaist

              Hi,

              Can you provide a minimal compilable example that shows that issue ?

              R Offline
              R Offline
              RoApPr
              wrote on last edited by
              #6

              @SGaist , look, while I was making a cropped copy of the program, I solved my original problem xD
              However, the solution is a "crutch" that I would like not to use.
              At the moment, the problem is this - when zooming the map, there is a moment when the rendering time of a new map section begins to take ten times longer than before. I can't understand why this is happening and hope for your help :)
              Google disc program archive
              P.S. I use Qt 5.12.

              1 Reply Last reply
              0
              • JonBJ JonB

                @RoApPr
                Fair enough. Are you able to test whether if you do not pass in any rectangles (so whole scene) these objects do show? Then we know it seems to be a source rectangle issue.

                R Offline
                R Offline
                RoApPr
                wrote on last edited by
                #7

                @JonB , yes, indeed, the problem was with the boundingRect() function, which I forgot to update when installing the "crutch". Now everything works correctly :) Thank you for the tip!

                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
                • Unsolved