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

QTimeEdit

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 3 Posters 654 Views 2 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.
  • PerdrixP Offline
    PerdrixP Offline
    Perdrix
    wrote on last edited by
    #1

    Can I set the maximum time for a QTimeEdit to be > 23:59:59

    Can I control the format to be other that hh:mm:ss?

    Thanks
    David

    JonBJ M 2 Replies Last reply
    0
    • PerdrixP Perdrix

      Can I set the maximum time for a QTimeEdit to be > 23:59:59

      Can I control the format to be other that hh:mm:ss?

      Thanks
      David

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Perdrix said in QTimeEdit:

      Can I set the maximum time for a QTimeEdit to be > 23:59:59

      No, it's a time of day, not an elapsed time.

      Can I control the format to be other that hh:mm:ss?

      I don't think so. See @mpergand below.

      1 Reply Last reply
      1
      • PerdrixP Perdrix

        Can I set the maximum time for a QTimeEdit to be > 23:59:59

        Can I control the format to be other that hh:mm:ss?

        Thanks
        David

        M Offline
        M Offline
        mpergand
        wrote on last edited by mpergand
        #3

        @Perdrix said in QTimeEdit:

        Can I control the format to be other that hh:mm:ss?

        QTimeEdit inherits of QDateTimeEdit.
        have a look at setDisplayFormat(const QString &format)

        PerdrixP 1 Reply Last reply
        2
        • M mpergand

          @Perdrix said in QTimeEdit:

          Can I control the format to be other that hh:mm:ss?

          QTimeEdit inherits of QDateTimeEdit.
          have a look at setDisplayFormat(const QString &format)

          PerdrixP Offline
          PerdrixP Offline
          Perdrix
          wrote on last edited by
          #4

          So if I want to edit a duration (which is indeed what I want to do), is there an equivalent of QTImeEdit for that?

          Thanks
          David

          JonBJ 1 Reply Last reply
          0
          • PerdrixP Perdrix

            So if I want to edit a duration (which is indeed what I want to do), is there an equivalent of QTImeEdit for that?

            Thanks
            David

            JonBJ Offline
            JonBJ Offline
            JonB
            wrote on last edited by
            #5

            @Perdrix
            No, there is not. IIRC when I needed to do this I had to roll my own (e.g. 3 spinboxes in a widget).

            PerdrixP 1 Reply Last reply
            0
            • JonBJ JonB

              @Perdrix
              No, there is not. IIRC when I needed to do this I had to roll my own (e.g. 3 spinboxes in a widget).

              PerdrixP Offline
              PerdrixP Offline
              Perdrix
              wrote on last edited by
              #6

              @JonB Would you be prepared to share that?

              Thanks, David

              JonBJ 1 Reply Last reply
              0
              • PerdrixP Perdrix

                @JonB Would you be prepared to share that?

                Thanks, David

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by
                #7

                @Perdrix
                Sorry, it was an "IIRC", I would not know which project it was in or whether I still have it.

                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