Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Create a notification at a certain time

Create a notification at a certain time

Scheduled Pinned Locked Moved General and Desktop
6 Posts 5 Posters 2.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.
  • H Offline
    H Offline
    HDennis
    wrote on last edited by
    #1

    Hello,

    For school I have to create a calendar program for the PC with Qt,
    this calendar also has to give notifications a certain time before some scheduled appointment starts.

    But i have trouble finding out how I exactly can create this notifications without using a while loop (which will stop my program), I would be really thankfully if someone can help me a bit with that certain part of my project.

    Thank you,
    Dennis

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by
      #2

      This "post":https://qt-project.org/forums/viewthread/14561 may help you.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • A Offline
        A Offline
        anmol2701
        wrote on last edited by
        #3

        Try this:

        QDateTime now = QDateTime::currentDateTime();
        QDateTime display;

        Using QTimer

        QTimer *timer=new QTimer;
        connect(timer, SIGNAL(timeout()),object,SLOT(display_msg());
        timer->start(now.secsTo(display)*1000);

        1 Reply Last reply
        0
        • IamSumitI Offline
          IamSumitI Offline
          IamSumit
          wrote on last edited by
          #4

          Hii
          I think for more information to your project you can take a look
          http://msdn.microsoft.com/en-us/library/aa383614(v=vs.85).aspx
          if you want to use WIN 32 API
          hope it helps.

          Be Cute

          1 Reply Last reply
          0
          • p3c0P Offline
            p3c0P Offline
            p3c0
            Moderators
            wrote on last edited by
            #5

            bq. I think for more information to your project you can take a look
            http://msdn.microsoft.com/en-us/library/aa383614(v=vs.85).aspx
            if you want to use WIN 32 API
            hope it helps.

            Why go for Window's specific API's when Qt has the functionality ? In this way it would be platform independent.

            157

            1 Reply Last reply
            0
            • IamSumitI Offline
              IamSumitI Offline
              IamSumit
              wrote on last edited by
              #6

              i gave this link because for more detail in order to clear and deep understanding.

              yeah you are right WIN API is not recommended but could be the last option.

              Be Cute

              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