Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Qtime

    General and Desktop
    5
    9
    2910
    Loading More Posts
    • 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
      Vidhya last edited by

      How can i archive live time displaying in my ui form

      Regards,
      Vidhya

      1 Reply Last reply Reply Quote 0
      • L
        lgeyer last edited by

        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 Reply Quote 0
        • T
          tucnak last edited by

          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 Reply Quote 0
          • A
            andre last edited by

            [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 Reply Quote 0
            • T
              tucnak last edited by

              [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 Reply Quote 0
              • A
                andre last edited by

                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 Reply Quote 0
                • T
                  tucnak last edited by

                  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 Reply Quote 0
                  • V
                    Vidhya last edited by

                    thank u. i got the solution

                    Regards,
                    Vidhya

                    1 Reply Last reply Reply Quote 0
                    • S
                      Sam last edited by

                      Kindly Edit your title and add [Solved].

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post