Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Rectangle and text drawn using QQuickPaintedItem isn't sharp in iOS devices

Rectangle and text drawn using QQuickPaintedItem isn't sharp in iOS devices

Scheduled Pinned Locked Moved Mobile and Embedded
qquickpainteditqpainterios
4 Posts 2 Posters 2.0k 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.
  • L Offline
    L Offline
    literA2
    wrote on 25 Mar 2015, 10:42 last edited by literA2
    #1

    I am having problem with rectangle and text drawn using QPainter on iOS devices ONLY. I tried building it into different iOS simulators (iP4S, iP5/S, iP6/+) and actual devices (iP4S, iP6, iPad Air) the same problem though less visible on large screen devices. The problem didn't occur on Android.

    QQuickPaintedItem antialiasing and smooth property have been enabled within the constructor.
    QPoints of the rectangle were all integers and didn't fall into floating coordinates.
    RenderHint has been enabled.
    I've tried using QPainterPath in creating roundedRect, same issue.

    Here's the sample:

    sample

    Please advise, TIA.

    1 Reply Last reply
    0
    • L Offline
      L Offline
      literA2
      wrote on 30 Mar 2015, 16:35 last edited by
      #2

      Regarding the text, found out that it has been scaled that is why it appeared pixelated.
      Read in one of the topic here that anti aliasing isn't working on iOS.

      Is there any work-around on this?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        benlau
        Qt Champions 2016
        wrote on 31 Mar 2015, 07:49 last edited by
        #3

        I have got the same problem. The circle / triangle rendered via QQuickPaintedItem is blurred. Since the geometry system used in Qt iOS is "point" instead of "pixel". (e.g iPhone 6 : 1 pt = 2 px , iPhone 6+ : 1 pt = 3px). The rendered image will be scaled up to 2x / 3x . AA is not helpful in this case.

        Finally , I can not find any way to fix with QQuickPaintedItem. I just changed to use QQuickItem.

        L 1 Reply Last reply 1 Apr 2015, 08:58
        0
        • B benlau
          31 Mar 2015, 07:49

          I have got the same problem. The circle / triangle rendered via QQuickPaintedItem is blurred. Since the geometry system used in Qt iOS is "point" instead of "pixel". (e.g iPhone 6 : 1 pt = 2 px , iPhone 6+ : 1 pt = 3px). The rendered image will be scaled up to 2x / 3x . AA is not helpful in this case.

          Finally , I can not find any way to fix with QQuickPaintedItem. I just changed to use QQuickItem.

          L Offline
          L Offline
          literA2
          wrote on 1 Apr 2015, 08:58 last edited by literA2 4 Jan 2015, 09:24
          #4

          @benlau said:

          Finally , I can not find any way to fix with QQuickPaintedItem. I just changed to use QQuickItem.

          Hi, thank you for your response. Since you used QQuickItem instead, did you used updatePaintNode() in painting and didn't used QPainter?

          Can you please provide me a simple code in implementing QQuickItem?
          Actually, I tried creating rectangles using QSGGoemetryNode however i can't find any example on how to draw text using QSG without using QPainter.
          Sorry i'm still new to integrating c++ in QML. TIA.

          1 Reply Last reply
          0

          4/4

          1 Apr 2015, 08:58

          • Login

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