Important: Please read the Qt Code of Conduct -

How to solve this "undefined reference to `QPropertyAnimation::QPropertyAnimation(QObject*, QByteArray const&, QObject*)'"

  • Hi,

    I am using [[doc:QPropertyAnimation]] in my project when am trying to run i am getting this error. i know something i need to add in *.pro file like QT += .... please anybody can tell whats that

  • You should not need to add anything special to your .pro file, as QPropertyAnimation is in QtCore.
    -I do notice that the signature of that constructor is slightly different from what you have above. Notice the position of the const for the second argument.-

    Edit: it was pointed out to me that the two are equivalent, so this is not the issue.

  • Thanks Andre i will try this

  • Hi Andre,

    I have one doubt, At very first am getting the error like "Qpropertyanimation No such file or directory". then i searched that file in my pc and i pasted that in the appropriate path then am getting this error what i mentioned above. please tell me the right way to do that.

  • What version of Qt are you compiling against? You should only need to include the header like this:
    #include <QPropertyAnimation>
    Don't just copy/paste header files to get around missing files from the library, that won't ever work. If the file is not in your library, then it is logical that it is not found at linker time. The code simply isn't in the library that you compile against!

  • Am using QT version 4.7. my target platform is arm board. the same program is working, when i try to run that program from qt itself. while cross am getting this error and also in my program i have already added this line

    @#include <QPropertyAnimation>@ i don't know how to add this stuff for the cross compiling

  • Andre can u help me out from this problem?

  • [quote author="cdeepak" date="1329823508"]Andre can u help me out from this problem?[/quote]

    Come on... kicking your topic after 35 minutes? Do you think I have nothing else to do in a day than hang out on the forum and - free of charge - try to help people out? I have my own work to do as well. It is quite unpolite to demand attention like this.

Log in to reply