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. subtract seconds by 10
Qt 6.11 is out! See what's new in the release blog

subtract seconds by 10

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 573 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.
  • J Offline
    J Offline
    julie546
    wrote on last edited by
    #1

    hi how can subtract seconds by 10 please
    QString filenamecamera=QDateTime::currentDateTime().toString(QString("'%1/CaméraAvant_'yyyy_MM_dd'_'hh_mm_ss'").arg(dossier));

    1 Reply Last reply
    0
    • JoeCFDJ Offline
      JoeCFDJ Offline
      JoeCFD
      wrote on last edited by
      #2

      QString filenamecamera=QDateTime::currentDateTime().addSecs(-10).toString(QString("'%1/CaméraAvant_'yyyy_MM_dd'_'hh_mm_ss'").arg(dossier));

      https://doc.qt.io/qt-5/qdatetime.html#addSecs

      J 1 Reply Last reply
      7
      • Kent-DorfmanK Offline
        Kent-DorfmanK Offline
        Kent-Dorfman
        wrote on last edited by
        #3

        std::chrono #include <chrono>

        The dystopian literature that served as a warning in my youth has become an instruction manual in my elder years.

        1 Reply Last reply
        0
        • JoeCFDJ JoeCFD

          QString filenamecamera=QDateTime::currentDateTime().addSecs(-10).toString(QString("'%1/CaméraAvant_'yyyy_MM_dd'_'hh_mm_ss'").arg(dossier));

          https://doc.qt.io/qt-5/qdatetime.html#addSecs

          J Offline
          J Offline
          julie546
          wrote on last edited by
          #4

          @JoeCFD thanks

          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