Issues installation Timeline for QT Creator using Qt 5.15.2 on Mac Big Sur
-
I am new to Qt, and cannot install Qtquicktimeline. I have cloned the git from this address https://github.com/qt/qtquicktimeline
I also found this website https://code.qt.io/cgit/qt/qtquicktimeline.git/tree/ which seems to show the active development. I noticed the .pro and qmldir files were not in the initial git repo so I have added them to my directory.
I then go to terminal and change to my directory Qt5/5.15.2/clang_64 and then run the following
bin/qmake qtquicktimeline/qtquicktimeline.pro
This seems to work without any issues. I then type 'make' and this is where the errors occur. The output from terminal is printed below.
In file included from ../../../qtquicktimeline/src/imports/timeline/qquickkeyframe.cpp:33: ../../../qtquicktimeline/src/imports/timeline/keyframedatautils_p.h:234:34: error: no member named 'metaType' in 'QVariant' const QMetaType type = value.metaType(); ~~~~~ ^ ../../../qtquicktimeline/src/imports/timeline/qquickkeyframe.cpp:311:12: error: no matching constructor for initialization of 'QQmlListProperty<QQuickKeyframe>' return { this, &d->keyframes, QQuickKeyframeGroupPrivate::append_keyframe, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../lib/QtQml.framework/Headers/qqmllist.h:80:5: note: candidate constructor not viable: no known conversion from 'qsizetype (QQmlListProperty<QQuickKeyframe> *)' (aka 'long long (QQmlListProperty<QQuickKeyframe> *)') to 'QQmlListProperty<QQuickKeyframe>::CountFunction' (aka 'int (*)(QQmlListProperty<QQuickKeyframe> *)') for 4th argument QQmlListProperty(QObject *o, void *d, AppendFunction a, CountFunction c, AtFunction t, ^ ../../../lib/QtQml.framework/Headers/qqmllist.h:104:5: note: candidate constructor not viable: requires 4 arguments, but 6 were provided QQmlListProperty(QObject *o, void *d, CountFunction c, AtFunction a) ^ ../../../lib/QtQml.framework/Headers/qqmllist.h:92:5: note: candidate constructor not viable: requires 8 arguments, but 6 were provided QQmlListProperty(QObject *o, void *d, AppendFunction a, CountFunction c, AtFunction t, ^ ../../../lib/QtQml.framework/Headers/qqmllist.h:69:5: note: candidate constructor not viable: requires 2 arguments, but 6 were provided QQmlListProperty(QObject *o, QList<T *> &list) ^ ../../../lib/QtQml.framework/Headers/qqmllist.h:75:5: note: candidate constructor not viable: requires 2 arguments, but 6 were provided QQmlListProperty(QObject *o, QList<T *> *list) ^ ../../../lib/QtQml.framework/Headers/qqmllist.h:56:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 6 were provided class QQmlListProperty { ^ ../../../lib/QtQml.framework/Headers/qqmllist.h:56:7: note: candidate constructor (the implicit move constructor) not viable: requires 1 argument, but 6 were provided ../../../lib/QtQml.framework/Headers/qqmllist.h:65:5: note: candidate constructor not viable: requires 0 arguments, but 6 were provided QQmlListProperty() = default; ^ ../../../qtquicktimeline/src/imports/timeline/qquickkeyframe.cpp:521:14: error: no matching member function for call to 'convert' preValue.convert(targetType); ~~~~~~~~~^~~~~~~ ../../../lib/QtCore.framework/Headers/qvariant.h:288:10: note: candidate function not viable: no known conversion from 'const QMetaType' to 'int' for 1st argument bool convert(int targetTypeId); ^ ../../../lib/QtCore.framework/Headers/qvariant.h:495:10: note: candidate function not viable: requires 2 arguments, but 1 was provided bool convert(const int t, void *ptr) const; // ### Qt6: drop const ^ ../../../qtquicktimeline/src/imports/timeline/qquickkeyframe.cpp:523:20: error: no matching member function for call to 'convert' convertedValue.convert(targetType); ~~~~~~~~~~~~~~~^~~~~~~ ../../../lib/QtCore.framework/Headers/qvariant.h:288:10: note: candidate function not viable: no known conversion from 'const QMetaType' to 'int' for 1st argument bool convert(int targetTypeId); ^ ../../../lib/QtCore.framework/Headers/qvariant.h:495:10: note: candidate function not viable: requires 2 arguments, but 1 was provided bool convert(const int t, void *ptr) const; // ### Qt6: drop const ^ 4 errors generated. make[3]: *** [.obj/qquickkeyframe.o] Error 1 make[2]: *** [sub-timeline-make_first] Error 2 make[1]: *** [sub-imports-make_first] Error 2 make: *** [sub-src-make_first] Error 2
What seems weird is that I can see in the terminal message 'Qt6' statements. I do not know how to install timeline and it has driven me crazy for several hours now. Please can anyone help?
-
You should check out the branch for Qt5. The one you're using now is for Qt6 - QVariant::metaType() is only available since Qt6.0
-
I feel so stupid. Thank you so much. I thought I downloaded the git branch for 5.15.2 but I hadn’t. I have just changed to Qt 6 and it installed perfectly.