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
Forum Updated to NodeBB v4.3 + New Features

subtract seconds by 10

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 194 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>

        I light my way forward with the fires of all the bridges I've burned behind me.

        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