Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Spanish
  4. Reloj en tiempo real
Forum Updated to NodeBB v4.3 + New Features

Reloj en tiempo real

Scheduled Pinned Locked Moved Spanish
2 Posts 2 Posters 3.5k 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.
  • S Offline
    S Offline
    shikamarucb
    wrote on last edited by
    #1

    Hola a todos quisiera saber como puedo simular un reloj en tiempo real en un "Label" he estado usando la libreria "time.h"; para obtener el tiempo uso la funcion time(time_t *variable); y para convertirlo a string uso ctime(time_t *variable); estas funciones me convierten muy bien el tiempo; el problema es que solo me pone la hora al ejecutar el programa pero no se actualiza; he intentado con un while en diferentes partes, en el main, en el constructor etc.. pero no ha funcionado. Si alguien me pudiera colaborar le agradeceria.

    1 Reply Last reply
    0
    • juankiJ Offline
      juankiJ Offline
      juanki
      Moderators
      wrote on last edited by
      #2

      Hola

      Aquí tienes un par de ejemplos:
      http://doc.qt.io/qt-5/qtwidgets-widgets-analogclock-example.html
      http://doc.qt.io/qt-5/qtwidgets-widgets-digitalclock-example.html

      Parece que usan la clase "QTimer":http://doc.qt.io/qt-5/qtimer.html

      Saludos

      Intenta explicar el problema lo más claro y detallado posible. Adjunta los errores y el código que creas da el error.
      Procura escribir correctamente y sin faltas de ortografía.

      Si la duda se solucionó, por favor, marca el tema como 'solucionado'.

      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