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. Artifacts in QGraphicsView when moving QGraphicsObject
Qt 6.11 is out! See what's new in the release blog

Artifacts in QGraphicsView when moving QGraphicsObject

Scheduled Pinned Locked Moved Solved General and Desktop
2 Posts 1 Posters 1.3k Views 2 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.
  • ModelTechM Offline
    ModelTechM Offline
    ModelTech
    wrote on last edited by
    #1

    In creating a graphical editor, I use the possibility of selecting QGraphicsObjects and painting them differently when selected. To this end, I have added 8 dots to the painting of my QGraphicsObject which are positioned on its boundingRect. However, when moving a selected QGraphicsObject around by left-hand click and drag it over the canvas, I get these strange artifacts that I didn't have before I added the 8 dots. In an attempt to solve this, I tried increasing the size of the boundingRect to get the dots more inside it, but this approach didn't help. Is there a simple way to solve this issue? Not sure whether it related to this but I have used QGraphicsView::setRenderHints(QPainter::Antialiasing | QPainter::TextAntialiasing).

    alt text

    1 Reply Last reply
    0
    • ModelTechM Offline
      ModelTechM Offline
      ModelTech
      wrote on last edited by
      #2

      Ok, I managed to solve it but drawing the additional dots not on the boundingRect but by drawing them 1 px within the bounds of the boundingRect.

      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