Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
-
None
Description
KDE Plasma has an effect called "overview"
which is implemented with QtQuick. Neither of the existing views in QtQuick (ListView, StackView, PathView, etc) can be used to position windows, so we implemented a custom view in QML. It's very difficult to properly manage animations with declarative approach (we tried using states but the complexity explodes really fast), so we would like to re-implement the view logic in C++ so we have higher control over animations and less error prone codebase.
The problem is that the APIs needed to implement a custom view type in C++ are private to QtQuick, for example the delegate model or qtquick transition apis. While delegate model can be sort of replicated with the public APIs, transition APIs cannot be. It's not possible to write
class MyView : public QObject
{
Q_PROPERTY(QQuickTransition *add READ addTransition WRITE setAddTransition NOTIFY addTransitionChanged)
};
nor to start transitions in C++ code.
This little project demonstrates what we are roughly aiming for. Unfortunately, it has to use private qtquick apis which is problematic. You can build and run the project to see more clearer how our custom view behaves.
At the minimum, it would be great if QQuickTransition is a public type and one can manipulate (start or retarget) transitions in C++ code.