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. Qtime
QtWS25 Last Chance

Qtime

Scheduled Pinned Locked Moved General and Desktop
9 Posts 5 Posters 3.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.
  • V Offline
    V Offline
    Vidhya
    wrote on last edited by
    #1

    How can i archive live time displaying in my ui form

    Regards,
    Vidhya

    1 Reply Last reply
    0
    • L Offline
      L Offline
      lgeyer
      wrote on last edited by
      #2

      You've already found the "Digital Clock Example":http://qt-project.org/doc/qt-4.8/widgets-digitalclock.html, haven't you?

      1 Reply Last reply
      0
      • T Offline
        T Offline
        tucnak
        wrote on last edited by
        #3

        What is the problem? You can implement your own widget and use it on your form! It's very simple - the simplest solution will be QTime+QLabel.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          [quote author="tucnak" date="1342512107"]What is the problem? You can implement your own widget and use it on your form! It's very simple - the simplest solution will be QTime+QLabel.[/quote]
          Just those two will result in the current time being displayed on the form, but only for a very brief moment: at construction. The question, if I understood it correctly, is how to make a clock that keeps updating itself, and thus always displays the current time.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            tucnak
            wrote on last edited by
            #5

            [quote author="Andre" date="1342512420"]
            [quote author="tucnak" date="1342512107"]What is the problem? You can implement your own widget and use it on your form! It's very simple - the simplest solution will be QTime+QLabel.[/quote]
            Just those two will result in the current time being displayed on the form, but only for a very brief moment: at construction. The question, if I understood it correctly, is how to make a clock that keeps updating itself, and thus always displays the current time.

            [/quote]

            Why author cannot implement own widget which inherit QLabel and use QTimer there to achieve what are you talking about?

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andre
              wrote on last edited by
              #6

              Sure he can. That's what the example referenced by Lukas does, isn't it? The trick is to use the [[doc:QTimer]], of course, and you did not mention that in your original post. You only talked about QTime+QLabel, and those won't cut it.

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tucnak
                wrote on last edited by
                #7

                bq. The trick is to use the QTimer, of course, and you did not mention that in your original post. You only talked about QTime+QLabel, and those won’t cut it.

                Sorry, I forgot about it). Yes, of course - QTimer must be used in any way.

                1 Reply Last reply
                0
                • V Offline
                  V Offline
                  Vidhya
                  wrote on last edited by
                  #8

                  thank u. i got the solution

                  Regards,
                  Vidhya

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    Sam
                    wrote on last edited by
                    #9

                    Kindly Edit your title and add [Solved].

                    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