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. QML + OpenGL = No Smooth Fonts?
Forum Update on Monday, May 27th 2025

QML + OpenGL = No Smooth Fonts?

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

    Hello.
    I'm writing QML application and there is a lot of transformations and effects.
    I have enabled OpenGL Acceleration by this code:
    @QApplication::setGraphicsSystem("opengl");@

    Or I have tried this:

    @ QGLFormat format = QGLFormat(QGL::DirectRendering|QGL::DoubleBuffer);
    format.setSampleBuffers(true);//Antialias
    //format.setStencil(true);//PixelBuffer
    QGLWidget glWidget(format);
    glWidget.setAutoFillBackground(false);
    mainWindow.setViewport(&glWidget);@

    The same result: all become works faster.
    There is a lot texts with animating by property scale.
    But it is problem on Debian 6 Linux, if I enable OpenGL acceleration than all fonts become sharpness.
    Seems AntiAliasing become disabled and it looks bad..
    I have tried enabling font AntiAlias by KDE settings, but it not helps, all fonts is smooth except my program.
    I have tried to scale text to 0.5 and double font.pointSize but it not helps.
    On Windows it works fine with OpenGL enabled.
    All images that uses same effect (by scale property) shows smooth.
    How can I fix it?
    Is there way to render text into Image and show text as image?

    PS: Sorry for my bad English.

    1 Reply Last reply
    0
    • X Offline
      X Offline
      XLeopard
      wrote on last edited by
      #2

      I am learning OpenGL too.
      But I don't know how to import 3D models in it.
      Can you help me ?

      1 Reply Last reply
      0
      • J Offline
        J Offline
        julyighor
        wrote on last edited by
        #3

        Here the link: http://habrahabr.ru/post/133126/
        It is on Russian, but you can try read example code.

        [quote author="XLeopard" date="1336813650"]I am learning OpenGL too.
        But I don't know how to import 3D models in it.
        Can you help me ?[/quote]

        1 Reply Last reply
        0
        • X Offline
          X Offline
          XLeopard
          wrote on last edited by
          #4

          Thank you very much. It's useful though I don't know the file name.

          It seems that you have more than one problems.
          1.text alias
          2 render text into image

          Maybe you can try glHint().
          But I don't know why you want to make text into image.

          1 Reply Last reply
          0
          • J Offline
            J Offline
            julyighor
            wrote on last edited by
            #5

            I want to make text into image because text antialias problem during scale animation.
            Text is not smooth while it scaling on Linux.
            But on Windows all works fine.

            1 Reply Last reply
            0
            • X Offline
              X Offline
              XLeopard
              wrote on last edited by
              #6

              Sorry, can't help.

              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