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. Is there any way to animate QAction button on panel ?
Forum Updated to NodeBB v4.3 + New Features

Is there any way to animate QAction button on panel ?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 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.
  • A Offline
    A Offline
    Anticross
    wrote on last edited by
    #1

    I've got some QTabBar with some QActions on it. And I want to make some animation of one of it's actions. For example with the help of 5-6 images. I know that I can make some timer and slot when I will change action's icon for each tick(). But is there any other more standard way to do this ?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      I think I'd not manipulate the QAction, but create a button that runs the animation instead. Recognize that QAction is not a widget. A QAction put on a QToolBar (not a QTabBar, that one draws tabs) is represented by a QToolButton. You could make your own QToolButton, and for instance put a QLabel on which you put a QMovie. Then, either set that button manually on the tool bar, or wrap the widget in a QWidgetAction.

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

        Ok, thanks, Andre. Is there any way to add QToolButton to QToolBar with the help of designer ?(I can't actualy do this when drag'n'drop). Or I need to do this manually in code ?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Eh... Not sure. Try and see!
          Do you have objections to writing code?

          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