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. QPainter font on QOpenGLPaintDevice issues
QtWS25 Last Chance

QPainter font on QOpenGLPaintDevice issues

Scheduled Pinned Locked Moved Unsolved General and Desktop
font sizeqopenglpaintdev
4 Posts 2 Posters 966 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.
  • J Offline
    J Offline
    joshh
    wrote on 22 Feb 2018, 06:42 last edited by
    #1

    I am using QPainter to draw text onto an QOpenGLPaintDevice. Everything works great, drawLine, drawImage, etc.

    When I use drawText it also works as expected. However if my font size increases from 40pt to 50pt or above the entire text that is drawn is now a filled rectangle corresponding to the correct font size. I've tried a number of different font families.

    Any thoughts?

    Thanks

    K 1 Reply Last reply 22 Feb 2018, 07:04
    0
    • J joshh
      22 Feb 2018, 06:42

      I am using QPainter to draw text onto an QOpenGLPaintDevice. Everything works great, drawLine, drawImage, etc.

      When I use drawText it also works as expected. However if my font size increases from 40pt to 50pt or above the entire text that is drawn is now a filled rectangle corresponding to the correct font size. I've tried a number of different font families.

      Any thoughts?

      Thanks

      K Offline
      K Offline
      kenchan
      wrote on 22 Feb 2018, 07:04 last edited by
      #2

      @joshh
      Pixel size vs Point size?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        joshh
        wrote on 23 Feb 2018, 04:30 last edited by
        #3

        Thank you,

        I've tried setting pixel size and point size. Funny enough it breaks around the same value.

        K 1 Reply Last reply 23 Feb 2018, 10:42
        0
        • J joshh
          23 Feb 2018, 04:30

          Thank you,

          I've tried setting pixel size and point size. Funny enough it breaks around the same value.

          K Offline
          K Offline
          kenchan
          wrote on 23 Feb 2018, 10:42 last edited by kenchan
          #4

          @joshh
          What version of Qt and what OS are you using?
          Can you post a minimum working example so we can test it too?

          1 Reply Last reply
          0

          4/4

          23 Feb 2018, 10:42

          • 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