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. What library should I use for animation in Qt Widgets Application?
QtWS25 Last Chance

What library should I use for animation in Qt Widgets Application?

Scheduled Pinned Locked Moved Unsolved General and Desktop
animationqwidgetapplicationqt creator
4 Posts 4 Posters 911 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.
  • R Offline
    R Offline
    ricardovaras_99
    wrote on last edited by ricardovaras_99
    #1

    I have to do a simple pipeline simulator for a university course programming project. And I want to simulate water level increasing on a tank. That's not on the course's content and I've been looking for tutorials but it doesn't seem to be much about the animation topic, at least not about this simple interactive type I want to do.

    My idea is to have a widget with the image of the tank, and in front of that to show the animation of the water level increasing depending of the speed of the water entering the tank.

    What libraries should I use for doing this in a widget application? Can animations be done with QPainter, Bitmap, etc? Any books you recommend? Any tutorials? Thank you.

    JKSHJ 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      Two solutions comes to mind:

      • The graphics view framework
      • QtQuick

      See the QML Book for a good starting point on the later.

      Depending on how you want to do your animation, QtQuick is likely what you want to go after.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • S Offline
        S Offline
        stryga42
        wrote on last edited by
        #3

        For very simple animations you could also try QPropertyAnimation and use the animated property in a custom paint implementation for rendering the rising water level.

        1 Reply Last reply
        0
        • R ricardovaras_99

          I have to do a simple pipeline simulator for a university course programming project. And I want to simulate water level increasing on a tank. That's not on the course's content and I've been looking for tutorials but it doesn't seem to be much about the animation topic, at least not about this simple interactive type I want to do.

          My idea is to have a widget with the image of the tank, and in front of that to show the animation of the water level increasing depending of the speed of the water entering the tank.

          What libraries should I use for doing this in a widget application? Can animations be done with QPainter, Bitmap, etc? Any books you recommend? Any tutorials? Thank you.

          JKSHJ Offline
          JKSHJ Offline
          JKSH
          Moderators
          wrote on last edited by
          #4

          @ricardovaras_99 said in What library should I use for animation in Qt Widgets Application?:

          And I want to simulate water level increasing on a tank.

          Do you want to animate the water level (in other words, make the level rise or fall at a specific speed in real time)? Or do you just want to display the water level? (in other words, make the picture show the latest level)?

          If you want the latter, have a look at the Qt Quick Coffee Machine demo:

          • Video: https://resources.qt.io/videos/built-with-qt-qt-quick-coffee-machine-demo-qtws17
          • Code: https://doc.qt.io/qt-5/qtdoc-demos-coffee-example.html

          Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved