Questions tagged [qpropertyanimation]

The QPropertyAnimation class animates Qt properties.

The QPropertyAnimation class animates Qt properties.

QPropertyAnimation interpolates over Qt properties. As property values are stored in QVariants, the class inherits QVariantAnimation, and supports animation of the same variant types as its super class.

A class declaring properties must be a QObject. To make it possible to animate a property, it must provide a setter (so that QPropertyAnimation can set the property's value). Note that this makes it possible to animate many of Qt's widgets.

Reference: https://doc.qt.io/qt-5/qpropertyanimation.html

60 questions
0
votes
1 answer

How do I animate the scene Rectangle?

I am trying to move my QGraphicsScene rectangle using a animation to get the impression that it moves smoothly. But I don't know how to do it works. Could some one help me? I would like to konow if its possible to animate a Qtransform instance. if…
0
votes
0 answers

PySIde QPropertyAnimation lagging when running another function in parallel

I have a simple slide in animation of a main menu.: I have a button that triggers this animation and another function. The other function just sets text in a textbox and opens a dialog widget. The problem is the animation becomes very glitchy/laggy…
Shock-o-lot
  • 135
  • 1
  • 1
  • 11
0
votes
1 answer

How to create an animation toggle in Qt?

I have a layout like this: The requirement is When I click the button, the size of the detailText object will be enlarged/shrunken (BOTH CASES) as an animation. This is my code: #include MainWindow::MainWindow(QWidget…
songvan
  • 369
  • 5
  • 21
0
votes
1 answer

how enable widget moved when window size changed with paint event?

I am try to create a widget to animate a line, the when the windows size is changed, the animation always play the size. I know the PainterPath is always same, but i have no any simple idea to do? from PyQt5.QtGui import * from PyQt5.QtCore import…
jett chen
  • 1,067
  • 16
  • 33
0
votes
0 answers

QPropertyAnimation on widget opacity restarts on resize causing the window to blink/flicker

I have this code as follows: import sys from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * if __name__ == "__main__": app = QApplication(sys.argv) w = QWidget() eff =…
evilmandarine
  • 4,241
  • 4
  • 17
  • 40
0
votes
1 answer

pyqt animation causes object to partially disappeared

I was creating a animation in pyqt with a ball. But when I increase the speed of the animation the ball partially disappers. What can I do now? Please help! My code: from PyQt5.QtWidgets import QApplication, QWidget, QLabel from PyQt5.QtGui import…
Sayan Paul
  • 77
  • 2
  • 4
0
votes
1 answer

Qt Toolbar animation based on opacity

Toolbar(SelectionToolBar) is allowed LeftToolbarArea. and is presently hidden. When i take the mouse to the left border of the application, it will come with animation defined on opacity. This is working fine. But the problem is when I move over the…
V. Purbia
  • 57
  • 5
0
votes
1 answer

How do I get the animation to work correctly in PyQt5 Qt3D?

I am trying to understand the animation operation in PyQt5 from the example in https://doc.qt.io/qt-5.10/qt3d-simple-cpp-example.html I have translated the code into Python and am able to run it but there is no animation. I'm thinking I need to…
P Moran
  • 1,624
  • 3
  • 18
  • 32
0
votes
1 answer

How to change size of QGraphicsPixmap using animation?

I have class named Pixmap deriving from QGraphicsPixmapItem and StartScreen class deriving from QGraphicsScene. I want to use animations (QPropertyAnimation class) to resize displayed image in certain time range. Other actions like setting position…
Kamil Turek
  • 77
  • 1
  • 6
0
votes
0 answers

How do I animate a position change with QPropertyAnimation while using a layout method?

So basically what I am trying to do is animate a widget moving, the start point being (0,0) or somewhere on the side of the parent window, and then the end point being where the widget is actually positioned on the parent window. But I am using a…
kyle hoell
  • 117
  • 2
  • 13
0
votes
1 answer

Change the background color of a QPushButton with QPropertyAnimation

I'm trying to apply a soft color change to a QPushButton clicked event. My first approach with QPropertyAnimation works like a charm. header: class myAnim : public QWidget { Q_OBJECT Q_PROPERTY(QColor color READ color WRITE…
MichaW.
  • 21
  • 4
0
votes
1 answer

Start QPropertyAnimation delayed

I have a small animation showing/hiding a frame when the mouse hovers the parent widget (in the code snippet below "MyWidget"). The animation simply changing the maximumWidth property of the frame so the frame becomes visible as some "slide-in…
550
  • 1,070
  • 1
  • 13
  • 28
0
votes
1 answer

QPropertyAnimation modifying interval

I'm using a QPropertyAnimation object to move some controls in the following way: QPropertyAnimation* animation = new QPropertyAnimation(message_, "pos"); animation->setDuration(2000); animation->setStartValue(current_pos); …
kh25
  • 1,238
  • 1
  • 15
  • 33
0
votes
1 answer

Animate the resizing of a QListView

I have a QListView which I can fit to contents by calling updateGeometry. Now I want to animate it. I cant use the resizeEvent, since it is calles after the widget has been resized. What is the proper place to start this animation, ergo which…
ManuelSchneid3r
  • 15,850
  • 12
  • 65
  • 103
-1
votes
1 answer

Tutorial for QPushButton graphics

Does anyone know some good tutorial to learn how to do some graphics/animation/design for the Qt QPushButton? I've been looking for one suitable for me, but I find none really interesting or well explained. I've read the documentation, but I want…
Chax
  • 1,041
  • 2
  • 14
  • 36
1 2 3
4