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

QTimer

Scheduled Pinned Locked Moved Solved Spanish
4 Posts 2 Posters 1.7k 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.
  • X Offline
    X Offline
    Xedig
    wrote on last edited by
    #1

    Hola amigos, estoy intentando para un QTimer, pero no veo claro como usar killtimer(), ¿me podeis echar un cable?
    Gracias

    1 Reply Last reply
    0
    • Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @Xedig un objeto QTimer normalmente se para con el método stop()
      El método killtimer(int id) es de la clase QObject y es de más bajo nivel, cuando trabajas con eventos de temporizador (timer event). Para usarlo necesitas el id que devolvió el método QObject::startTimer()
      Yo usaría la abstracción de más alto nivel brindada por QTimer...

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • X Offline
        X Offline
        Xedig
        wrote on last edited by
        #3

        Pablogracias por contestar, el metodo stop() de QTimer ya lo he probado y no para de ejecutarse, mi codigo es el siguiente:

        connect(timerCompruebaBuffer, SIGNAL(timeout()), this, SLOT(timer_comprueba_buffer()));
        timerCompruebaBuffer->start(5);
        ...
        ...
        timerCompruebaBuffer->stop();
        

        Y a pesar de usar stop() tal y como viene en la ayuda, no se para el timer,¿alguna sugerencia?

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

          Perdonen señores, tenia un gazapo y volvía a iniciar el timer con start(), el metodo stop() para el timer perfectamente. De todas formas mil gracias Pablo.

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved