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. <Solved>QTime::currentTime() question

<Solved>QTime::currentTime() question

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.4k 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.
  • C Offline
    C Offline
    cdbean04
    wrote on last edited by cdbean04
    #1

    When using QTime::currentTime() to get the current time, what format does that current time come back in. Like, is an integer or some time format or something else? I looked in
    http://doc.qt.io/qt-4.8/qtime.html#currentTime
    but could not find an answer.

    JKSHJ 1 Reply Last reply
    0
    • C cdbean04

      When using QTime::currentTime() to get the current time, what format does that current time come back in. Like, is an integer or some time format or something else? I looked in
      http://doc.qt.io/qt-4.8/qtime.html#currentTime
      but could not find an answer.

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by JKSH
      #2

      @cdbean04 said:

      When using QTime::currentTime() to get the current time, what format does that current time come back in. Like, is an integer or some time format or something else?

      currentTime() returns a QTime object.

      QTime does not have a fixed format. You can use QTime::toString() to format it however you want.

      I looked in http://doc.qt.io/qt-4.8/qtime.html#currentTime but could not find an answer.

      Look to the left of the function name. That tells you what type the function gives you (currentTime() gives you a QTime object, elapsed() gives you an integer, etc.)

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • C Offline
        C Offline
        cdbean04
        wrote on last edited by
        #3

        Thanks for the information

        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