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
1
vote
1 answer

Resize widget from center when animating the size property

I'm trying to code a widget that slightly increases in size on mouse-over and decreases when the mouse leaves again. This is what I have come up with so far: from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from…
1
vote
1 answer

qt QML collapsible nested ListView with PropertyAnimation

I am new to QT QML, and I am planning to make a ListView with collapse with smooth animation. I saw this https://gist.github.com/elpuri/3753756 code. I tried adding PropertyAnimation during collapse and expand to the code. But failed, how should i…
1
vote
1 answer

Animation to hide rows in a

I'm trying to create an animation to hide unselected rows in a QTableWidget. I want the height of the rows to decrease until it is 0, for a smoother transition. I found the following in C++ that does exactly what I'm trying to achieve, but I cannot…
John
  • 89
  • 1
  • 8
1
vote
1 answer

How to handle QPropertyAnimation for a large number of widgets

I want to have many colored dots constantly move across a background. (Description of code below): A PolkaDot widget is constructed with a random color, size, position, and duration. The QPropertyAnimation moves the widget across the screen from…
alec
  • 5,799
  • 1
  • 7
  • 20
1
vote
1 answer

QPropertyAnimation not working with Window Opacity

I'm setting up a new desktop widget to make my life easier at work and using QPropertyAnimation to make it pretty. Fading the app in and out doesn't seem to want to work and in typical coder fashion, it's brought my progress to a standstill. I'm…
Jamie
  • 13
  • 4
1
vote
1 answer

Line Animation with QPropertyAnimation

Trying to animate a line growing from nothing to a (0,0) to (200, 200) line with PyQt5 and using QPropertyAnimation. I already read a lot of documentation about Qt and tried several samples, but I just cannot get this to work. This is the code I…
evilmandarine
  • 4,241
  • 4
  • 17
  • 40
1
vote
1 answer

QPainter crashes while using the QPropertyAnimation

I want to use the graphicsOpacityEffect in propertyAnimation for a QFrame that contains a label with a pixmap. My code is: eff = QGraphicsOpacityEffect(frame) widget.setGraphicsEffect(eff) animation = QPropertyAnimation(eff,…
Karol
  • 61
  • 1
  • 5
1
vote
1 answer

Generate Slide animation left wing when changing Sales

I have the following code in which I seek to generate an animation slide to the left and show the following QMainWindow and close the current one for which it uses a QPropertyAnimation within a function but it does not work here I leave the…
1
vote
1 answer

Why the QPropertyAnimation animation does not work?

I'm trying to generate an animation when I press a button, but it does not work after the self.frame2 returns to size 0: this is an example: After the frame returns to 0 the animation is not done again: from PyQt5.QtWidgets import…
Mystic_Force
  • 263
  • 3
  • 12
1
vote
2 answers

QPropertyAnimation of a QGraphicsTextItem with a frame make the text shaky

I am animating a QGraphicsTextItem that I have added a frame around. During the animation the text seems to shake slightly inside the frame, which is very annoying. An example code: class MovingFrameText : public QGraphicsTextItem { Q_OBJECT; …
plover
  • 439
  • 5
  • 17
1
vote
1 answer

How to animate line around fixed point in Qt?

I'm trying to animate a line around a fixed point in Qt. I assume I need to use the QPropertyAnimation class to do this but cannot figure out which property to use. For clarity, here's what I'm trying to do. | (5, 10) | / | / | …
GotAQtQ
  • 13
  • 2
1
vote
1 answer

"Blinking" buttons in PyQT5

Here's the deal: I'm trying to make button A "blink" when button B is pushed, and the blinking should then stop when the user pushes button A. Furthermore, button A should then go back to its former state. After long reading through the…
Iridium
  • 31
  • 1
  • 8
1
vote
1 answer

QPropertyAnimation not functioning

My animation isn't working on this QPushButton quite the way I'm expecting. Here's my mainwindow.cpp, as you can see nothing particularly weird here. On runtime the button appears as one might expect. I didn't have any particular movement in mind. I…
Carl
  • 457
  • 5
  • 23
1
vote
0 answers

How to get the position of a widget in pyqt5, while using a layout method

How do i get a PyQt5 widgets coordinates relative to it's parent widget? Specifically when using layout method, in my case i am using the QGridLayout layout method. I have tried to get the widgets coordinates using the .x() and .y() methods. But…
kyle hoell
  • 117
  • 2
  • 13
1
vote
2 answers

Toggle button in PyQt

I have implemented the following toggle button in PyQt4 but I cannot understand why it is not behaving as expected when in "OFF" state. I cannot understand what seems to be the problem. Any help would be valuable and highly appreciated. Herewith,…
azal
  • 1,210
  • 6
  • 23
  • 43