Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Animating an image
Forum Updated to NodeBB v4.3 + New Features

Animating an image

Scheduled Pinned Locked Moved QML and Qt Quick
10 Posts 3 Posters 2.8k 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.
  • H Offline
    H Offline
    Harry443
    wrote on last edited by
    #1

    Hello all,
    I want to display an image for certain time interval depending on a condition.It should be like flashing an image after that time interval.I am using timers for it but can anyone suggest some good idea?
    thanks in advance:)

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mlong
      wrote on last edited by
      #2

      I'd say a timer is the way to go. Either a standalone QTimer, or the built-in timer functionality inherent in QObject (startTimer(), killTimer(), timerEvent(), etc.)

      Software Engineer
      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        aabc
        wrote on last edited by
        #3

        Do you know if QML timer is reliable ?

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mlong
          wrote on last edited by
          #4

          What's your definition of "reliable?" It should be as reliable as any other timer.

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            aabc
            wrote on last edited by
            #5

            Do you know how accurate is it ?

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mlong
              wrote on last edited by
              #6

              It depends on your underlying OS. It's not going to be realtime or at a single-digit ms resolution typically.

              Depends on your use case of how reliable you need. Keep in mind that other items in the event queue can also affect how often timer ticks are processed.

              See "here.":http://qt-project.org/doc/qt-4.8/QTimer.html#accuracy-and-timer-resolution

              There are also some other threads on the forum here which have discussed QTimer resolution.

              Software Engineer
              My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

              1 Reply Last reply
              0
              • A Offline
                A Offline
                aabc
                wrote on last edited by
                #7

                Is there as difference between the Qt C++ Timer and the QML Timer ?

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mlong
                  wrote on last edited by
                  #8

                  QML should be using the same timer mechanism that the C++ code uses (though I haven't verified that by looking at the sources.) But I can't imagine them reinventing the wheel specifically for QML.

                  Software Engineer
                  My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    aabc
                    wrote on last edited by
                    #9

                    Where can I find the QML sources ?

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      mlong
                      wrote on last edited by
                      #10

                      See http://qt.nokia.com/downloads/downloads#qt-lib

                      bq. The source code is available as a zip (260 MB) or a tar.gz (228 MB). Or visit the repository at qt.gitorious.org/qt.

                      It would be under .../src/declarative (and some headers strewn about)

                      Just a warning... There's a lot of code involved, though.

                      Again, though, I ask... what is it that you're trying to accomplish? If you describe what you're trying to do, we can probably give you better feedback as to whether the timer mechanism is sufficient.

                      Software Engineer
                      My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

                      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