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. Squares instead of letters when using QPainter::renderText on a texture placed in QOpenGLWidget

Squares instead of letters when using QPainter::renderText on a texture placed in QOpenGLWidget

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt 6openglopenglwidget
2 Posts 2 Posters 404 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.
  • H Offline
    H Offline
    harlamer
    wrote on last edited by
    #1

    There is a QOpenGLWidget on which a texture is placed using glTexImage2D. I'm trying to draw text on this texture using QPainter.DrawText, but it doesn't work. I get squares of all letters. But if you increase the font to 44, the text is displayed correctly. Also, if you remove the texture mapping via glTexImage2D, the text is displayed correctly. I tried a lot of things, nothing helped… Qt version 6.1.2

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on last edited by
      #2

      @harlamer Without a minimal compilable example that demonstrates the problem there's not much we can do. We do not know what platform, what font, what texture and texture setup, how the painter has been set up, what "displayed correctly" means, etc.

      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