Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Animated cursor
Forum Updated to NodeBB v4.3 + New Features

Animated cursor

Scheduled Pinned Locked Moved Game Development
1 Posts 1 Posters 2.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.
  • R Offline
    R Offline
    ritschratsch
    wrote on last edited by
    #1

    Hiho everybody,
    I'm programming a game with QT and the Irrlicht engine, and would like to animate the cursor in some cases.
    I read in one thread that this could be achieved by changing the picture of the cursor every x milliseconds.
    First of all, this doesn't seem the right way to me, I think there must be a way to do it without wasting that much cpu time.
    The second problem is, that I want to make the cursor animation speed independent from the fps of the game.
    So I can't check for the time passed in the main frame loop, and change the image of the cursor after x milliseconds, because if the game laggs, the cursor would lagg too.

    I tried it with the following command but without success
    @app.setOverrideCursor((new QCursor((new QPixmap("../media/interface/cursor.gif")))));@

    I assume QPixmap can't be animated so maybe there is a type I can use with setOverrideCursor so that I can simply use an animated gif file.
    Or maybe there is another function to change the cursor and set an animated file (movie, gif, ...)?

    I hope somebody can help me.

    Best regards
    Richy

    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