Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. Spanish
  4. Cerrar QDialog al pasar 3 segundos

Cerrar QDialog al pasar 3 segundos

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

    Hola que tal, queria preguntaros como podria provocar el cierre de un QDialog pasados 3 segundos de manera automatica.
    Gracias

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

      Hola

      Quizás puedas usar un QTimer.

      Un saludo

      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
      1
      • EddyE Offline
        EddyE Offline
        Eddy
        wrote on last edited by
        #3

        here is some code : forum topic

        Qt Certified Specialist
        www.edalsolutions.be

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

          Juanki gracias, con Qtimer me ha funcionado a la perfección.```
          En el cpp:
          miTimer = new QTimer(this);
          connect(miTimer,SIGNAL(timeout()), this, SLOT(onTimeOut()));
          miTimer->start(3000);

          Y en el header:
          class QTimer;
          .
          .
          .
          public slots:
              void onTimeOut();
          .
          .
          .
          private:
              .
              .
              QTimer *miTimer;
          
          
          Un saludo
          1 Reply Last reply
          0
          • EddyE Offline
            EddyE Offline
            Eddy
            wrote on last edited by Eddy
            #5

            Hola Xedig,

            Gracias por dar su solución aquí.
            Se puede marcar el tema como resuelto, haciendo clic en el botón Herramientas Tema de la derecha?

            Gracias,

            Eddy

            Qt Certified Specialist
            www.edalsolutions.be

            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