What's the best way to animate an image
-
Hello, I'm looking for an approach to animate the knobs of an image, using QT Designer and PYQT6
I want to be able to import an image, for example, such as this, and animate the knobs based on the hardware input:
As I understand, two images cannot be stacked on top of another in a layout. My first idea was to separate the knobs into another image and animate them on the background image, but that seems impossible.
This is how my gui looks right now with a placeholder image:
-
@SGaist Yes, I could import an image of a slider knob and use it as a resource on the slider widget's handle, but you can't put a slider widget on top of a label widget in a layout, can you? In the gui, I want to keep the black background, and I also want to import an image to represent the physical hardware midi controller that has slider/fader potentiometers.
-
@Mizmas you can use a QStackedWidget for that.
You could also set a background image on your widget.
-
@Mizmas said in What's the best way to animate an image:
I also want to import an image to represent the physical hardware midi controller that has slider/fader potentiometers.
Draw your own controllers starting by subclassing QAbstractButton.
All the widgets in the following pictures are drawn with QPainterPath & QGradiant, nothing else.