QDeclarativeView animation stops in release build
I created a small application which just shows a spinning icon. I've created this animation in QML.
This is what my application looks like:
QWidget poWidget = new QWidget();
QVBoxLayout* poLayout = new QVBoxLayout();
QDeclarativeView* view = new QDeclarativeView(); view->setSource(QUrl("qrc:/img/SpinningIcon.qml")); view->setViewportUpdateMode(QGraphicsView::FullViewportUpdate); poLayout->addWidget(view); poWidget->setLayout(poLayout); setCentralWidget(poWidget);
int main(int argc, char *argv)
QApplication a(argc, argv);
If I run it in debug mode on the Blaze with Windows EC7, everything works fine. If I try to run it in release mode, it stops spinning after a while and the CPU load goes up to nearly 100 %. (before it stops, the CPU load is around 20 %)
Does anybody have an idea what the problem could be?
Thank you in advance!
It works when I change the settings of the QtGui project.
When C/C++ - Optimization - Disabled is set, everything works fine.
The other problem is that the cpu load of the release build is a lot higher than the debug build when I embed QML in C++. Without QML the cpu load is a lot lower in debug mode.
Does anybody have an explanation for this?
I found out that it is enough to only change the optimization settings of qblendfunctions.cpp
But I still do not have an explanation for that :(