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

Animation in QML-Sine wave

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 3 Posters 6.1k 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 everyone,
    I am working on QtQuick 1.0. How can i animate a sine waveform that is moving from one end of the screen to the other end.Its an urgent requirement and i would be thankful if anyone has an idea on how to do this.

    Thanks in Advance:)

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sfiet_Konstantin
      wrote on last edited by
      #2

      If you know painting with Qt very well, you can implement your custom QML component (with QDeclarativeItem http://developer.qt.nokia.com/doc/qt-4.8/qdeclarativeitem.html).

      It is not that easy but works well. You can give it a property (that can be for example called "time") that controls the animation and then, use an Animation component in QML to animate it.

      1 Reply Last reply
      0
      • H Offline
        H Offline
        Harry443
        wrote on last edited by
        #3

        Thanks for the reply,
        Can't we use ShaderEffectSource of Qt Quick2.0. Is it useful working on the pixels to show the effect of sinusoidal wave or any other solution?
        I m not much familiar with painting in Qt and now i have to learn and do it. If it is only the solution i have to....help me in tracing all the possibilities regarding do it?

        Thanks in Advance

        1 Reply Last reply
        0
        • T Offline
          T Offline
          task_struct
          wrote on last edited by
          #4

          Hello,

          there is ShaderEffectSource for Qt Quick 1.0. See http://labs.qt.nokia.com/2011/05/03/qml-shadereffectitem-on-qgraphicsview/**

          "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

          • Linu...
          1 Reply Last reply
          0
          • H Offline
            H Offline
            Harry443
            wrote on last edited by
            #5

            Hello,
            Thank you.........
            I had worked on the Qt Quick 1.0 using "import Qt.labs.shaders 1.0"
            it is showing an error...........ShaderEffectItem::paint - OpenGL not available
            Can anyone suggest a solution for this?

            Thanks in Advance:)

            1 Reply Last reply
            0
            • T Offline
              T Offline
              task_struct
              wrote on last edited by
              #6

              Hi,

              You should add -opengl option to qmlviewer if your project is Qt Quick UI.
              If you use Qt Quick Application, set the QDeclarativeView’s viewport to be a QGLWidget and set the viewport update mode to FullViewportUpdate.

              "Most good programmers do programming not because they expect to get paid or get adulation by the public, but because it is fun to program."

              • Linu...
              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