Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [Solved] Custom QQuickPaintedItem apear blurry after instantiate more than once
Forum Updated to NodeBB v4.3 + New Features

[Solved] Custom QQuickPaintedItem apear blurry after instantiate more than once

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.3k 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.
  • D Offline
    D Offline
    dasun
    wrote on last edited by
    #1

    It is strange. I have created one QQuickPaintedItem based Qt Quick item for my application. If I have only one instance of it on visible area of Qt Quick Window it render as it should, but if I added one or more of it instances to the same window, Only the first Item appear sharp and clear. The second and other instances appear blurry as in attached image. Any Idea why this happening?

    !https://dl.dropboxusercontent.com/u/2395030/Custom-QQuickPaintedItem.png(Custom QQuickPaintedItem)!
    (open image in a separate tab to see the image clearly)

    It is hard to duplicate. Before I try write sample code to recreate this issue I thought it would be good Idea to ask it here.

    1 Reply Last reply
    0
    • J Offline
      J Offline
      Jens
      wrote on last edited by
      #2

      Are you sure that all of your items are aligned to the pixel grid? You might want to debug the x and y coordinates to make sure they are not located at floating point coordinates. You can also experiment with setting the smooth property to false on the items.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dasun
        wrote on last edited by
        #3

        That's a catch. I use floating point using QRectF positions with scaling. I'll check and update you. Thank you a lot!

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dasun
          wrote on last edited by
          #4

          Changing floating point positions to nearest integer worked! Thank you again.

          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