Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to render date and time in Qt using Opengl ES 2.0
Qt 6.12 LTS is out! See what's new in the release blog

How to render date and time in Qt using Opengl ES 2.0

Scheduled Pinned Locked Moved Mobile and Embedded
2 Posts 1 Posters 2.8k 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi,
    We want to draw date and Time on Opengl ES 2.0 context in QT 4.7.
    We have tried doing so using drawText(x,y,Qstring).
    following is the code attached for reference.
    QPainter painter;
    painter.begin( this );
    painter.setPen(Qt::red);
    painter.drawText(-6,6,QString("Example"));
    But it is not being drawn on the Opengl ES context.

    We are inheriting this widget class from QGLWidget.
    Is this the correct way or there is some other way to draw date and Time on the opengl ES 2.0 context?
    Please suggest or provide some link for reference.

    Regards,
    wisty

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      how about using the renderText() call ?

      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
      • Unsolved